1.进入容器
docker exec -it 容器名 bash
2.安装vim
apt-get update && apt-get install vim
3.修改配置文件
vim /etc/mysql/mysql.conf.d/mysqld.cnf
在配置文件的mysqld下加上
performance_schema_max_table_instances=400
table_definition_cache=400
table_open_cache=256
参考截图
4.重启容器
docker restart 容器名
5.top或htop查看内存使用量
htop查看mysql占用内存
网友评论