1.停止数据库服务后,修改vi /etc/my.cnf,在[mysqld]下面添加 lower_case_table_names=12.做好备份,删除数据库数据rm -rf /var/lib/mysql3.重启数据库 service mysql start4.查找密码 grep 'temporary password' /var/log/mysqld.log5.修改密码,密码8位以上,大小写符号数据ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '****';update user set host = "%" where user='root';FLUSH PRIVILEGES;