可以酌情修改内存大小和交换内存大小。
12345678
# filename: $HOME/data/mysql/conf/docker.cnf[mysqld]performance_schema_max_table_instances=400table_definition_cache=400table_open_cache=256performance_schema = offskip-host-cacheskip-name-resolve
docker run \ --cpus 0.2 \ -d -e MYSQL_ROOT_PASSWORD=123456 \ --name mysql \ -v $HOME/data/mysql/data:/var/lib/mysql \ -v $HOME/data/mysql/conf:/etc/mysql/conf.d \ -p 3306:3306 \ mysql
123
docker exec -it mysql bashmysql -u root -p123456ALTER USER 'root'@'%' IDENTIFIED WITH MYSQL_NATIVE_PASSWORD BY '123456';
感谢您的阅读。 🙏 关于转载请看这里