mysql
docker pull mysql
docker run -d --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 mysql
MySQL8.0登录提示caching_sha2_password问题解决方法
方式一:
配置 mysql.cnf 配置默认身份验证插件
[mysqld]
default_authentication_plugin = mysql_native_password
mysql -u root -p
SELECT Host, User, plugin from user;
方式二:
use mysql;
ALTER USER ‘root‘@‘%‘ IDENTIFIED WITH mysql_native_password BY ‘123456‘;
ALTER USER ‘root‘@‘localhost‘ IDENTIFIED WITH mysql_native_password BY ‘123456‘;
FLUSH PRIVILEGES;
SELECT Host, User, plugin from user;
docker run -d -p 3306:3306
-v /etc/mysql/my.cnf:/etc/mysql/conf.d/mysqld.cnf
-v /data/mysql/data:/var/lib/mysql
-e MYSQL_ROOT_PASSWORD=12345
--name mysql_test
mysql
相关推荐
CoderToy 2020-11-16
emmm00 2020-11-17
王艺强 2020-11-17
ribavnu 2020-11-16
bianruifeng 2020-11-16
wangshuangbao 2020-11-13
苏康申 2020-11-13
vivenwan 2020-11-13
moyekongling 2020-11-13
云中舞步 2020-11-12
要啥自行车一把梭 2020-11-12
aydh 2020-11-12
kuwoyinlehe 2020-11-12
minerk 2020-11-12
vitasfly 2020-11-12
jazywoo在路上 2020-11-11
敏敏张 2020-11-11
世樹 2020-11-11