mysql8修改密码

in 默认分类 with 0 comment
mysql -u root -p
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '新密码';

优化mysql占用的内存

vim /etc/mysql/mysql.conf.d/mysqld.cnf
[mysqld]
performance_schema_max_table_instances=400  
table_definition_cache=400  
table_open_cache=256
performance_schema = off

重启mysql

systemctl restart mysql
Responses