多实例

多实例:
mysqld install MySQL80-3316 --defaults-file="D:\software\mysql-8.0.16-winx64\my.ini
初始化后会生成data文件和一个密码
打开注册表,HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MySQL80-3316,把里面的ImagePath改为以下参数:
"D:\software\mysql-8.0.16-winx64\bin\mysqld" --defaults-file=D:\software\mysql-8.0.16-winx64\my.ini MySQL80-3307
启动服务:net start MySQL80-3307
修改密码:ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';
刷新权限:flush privileges;

 

Unable to load authentication plugin 'caching_sha2_password'.错误解决:

5.X版本是:default_authentication_plugin=mysql_native_password
8.x版本就是:default_authentication_plugin=caching_sha2_password
输入如下代码:(password换成相应密码)
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';


FLUSH PRIVILEGES;

alter user 'root'@'localhost' identified by 'password';
参考博客:https://www.cnblogs.com/wanguncle/p/11432868.html

posted on 2021-01-16 16:15  渐行渐远的那些人  阅读(59)  评论(0编辑  收藏  举报