Error content
reason
It is found that the MySQL driver jar package is only 5. X
Solution
Add the driver jar package/usr of mysql8 under/local/etc/dataX/plugin/reader/mysqlreader/LIBS
Error content
reason
It is found that the MySQL driver jar package is only 5. X
Solution
Add the driver jar package/usr of mysql8 under/local/etc/dataX/plugin/reader/mysqlreader/LIBS
You can start by logging into mysql in a DOS command window at
Then run: mysql> ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘root123’;
Query OK, 0 rows affected (0.07 sec)
Then you can log in normally.
PHP version is 5.6. An error is reported when connecting to mysql8.0, but it is normal to connect to other versions before mysql8
The reason may be that mysql8 uses different password authentication methods by default, and mysql8.0 uses caching by default_sha2_Password, but previous versions used mysql_native_password
Solution:
Modify the/etc/my.cnf file
Find default authentication plugin = MySQL_native_Password line
Cancel the # number in front and restart mysql. MySQL will be used by default_native_Password, and then use the previous PHP script to test the connection to MySQL
As follows. The root user marked by the red arrow can connect normally