docker下进去mysql 编写语句

设置密码可使用

docker exec -it mysql01 bash        --mysql01:数据库名字

mysql -u root -p

 

ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '你的密码';
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '你的密码';
SELECT plugin FROM mysql.user WHERE User = 'root';

posted @ 2018-11-05 16:19  steven.木子  阅读(657)  评论(0编辑  收藏  举报