新建:/my/mysql/my.cnf (准备挂载配置文件用) 将以下内容拷贝进去(或者启动一个docker的mysql,并且把/etc/mysql/my.cnf中的内容拷贝出来) # Copyright (c) , Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the te…
docker pull mysql docker run --name mysql -itd -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root1234 mysql docker exec -it mysql /bin/bash mysql -uroot -p 注意:远程绑定navicat需要授权,别忘记刷新 ALTER user 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root1234';FLUSH…