[Agent Master-Slave Server] 3009 - java.lang.IllegalArgumentException: Invalid DataSource:0

In the early stage, the master-slave server connection was normal, but an error occurred when connecting to Navicat.

1. Check the mysql master and slave servers

-- 查询所有MySQL用户的用户名、主机和身份验证插件信息
select user,host,plugin from mysql.user;

[Note] Both the master and slave servers must be changed.

2. Need to be changed to the following

step:

--注意后面需要设置密码
-- 修改用户 'root'@'localhost' 的密码为 'Yang@123',使用 mysql_native_password 加密方式进行身份验证
alter user 'root'@'localhost' identified with mysql_native_password by 'Yang@123';
-- 更新用户 'root' 的主机为 '%',允许从任何主机连接
update mysql.user set host='%' where user='root';

3. The above error situation will still occur.

Configuration file/etc/my.conf

--在文件最后进行复制,作用是同步utf-8编码,并设置加密方式
[mysqld]
default_authentication_plugin=mysql_native_password
character-set-server=utf8
collation-server=utf8_unicode_ci

After completion, you need to restart the MySQL server and test after completion.

Guess you like

Origin blog.csdn.net/m0_68495664/article/details/131908403