查看用户及密码密文:
mysql> select user,authentication_string from mysql.user;
设置密码:123456
ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY '123456';
ALTER USER 'debian-sys-maint'@'localhost' IDENTIFIED WITH caching_sha2_password BY '123456';
ALTER USER 'mysql.infoschema'@'localhost' IDENTIFIED WITH caching_sha2_password BY '123456';
ALTER USER 'mysql.session'@'localhost' IDENTIFIED WITH caching_sha2_password BY '123456';
ALTER USER 'mysql.sys'@'localhost' IDENTIFIED WITH caching_sha2_password BY '123456';
使用:
flush privileges;
再次查看用户及密码密文:
mysql> select user,authentication_string from mysql.user;
执行sql:
source /sql/xxx.sql;
quit;