下载mysql-apt-config包
wget https://repo.mysql.com/apt/debian/pool/mysql-apt-config/m/mysql-apt-config/mysql-apt-config_0.8.29-1_all.deb
安装下载的deb包
dpkg -i mysql-apt-config_0.8.29-1_all.deb
mysql8在初始化后不允许配置大小写敏感。修改配置文件都没用。
解决方案是:1.先安装;2.修改配置文件,添加lower_case_table_names=1,备份该配置文件;3.卸载mysql;4.保留修改后的配置文件的情况下重装mysql;
1.安装
更新apt
sudo apt update
安装mysql-server
apt-get -y install mysql-server
停止:
systemctl stop mysql
2.修改配置文件
vi /etc/mysql/mysql.conf.d/mysqld.cnf
加上lower_case_table_names=1
备份:
cp /etc/mysql/mysql.conf.d/mysqld.cnf /etc/mysql/mysql.conf.d/mysqld.cnf.backup
3 卸载:
apt-get --purge autoremove mysql-server
rm -R /var/lib/mysql
4 重装 MySQL :
apt-get install mysql-server
重新安装mysql时,会提示本地已经有mysqld.cnf这个配置文件,让你选使用下载来的包里的配置文件还是你本地的。切记选本地的。
安装完成修改密码:
mysql -uroot -p
ALTER USER ‘root’@‘localhost’ IDENTIFIED WITH ‘caching_sha2_password’;
设置密码
ALTER USER ‘root’@‘localhost’ IDENTIFIED BY ‘123456’;
flush privileges;
SELECT user,host,plugin,authentication_string FROM mysql.USER;
使用sql查询group_concat最大长度:
show variables like ‘group_concat_max_len’;
修改最大长度:
SET GLOBAL group_concat_max_len = 4294967295;
SET SESSION group_concat_max_len = 4294967295;
参考:https://blog.csdn.net/ddjsqlalala/article/details/123149508