Why do I get a "JDBC Driver Error: CLIENT_PLUGIN_AUTH is required" error when connecting to a remote MySQL database?
9 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2020 年 6 月 2 日
回答済み: MathWorks Support Team
2020 年 11 月 24 日
Why do I get a "JDBC Driver Error: CLIENT_PLUGIN_AUTH is required" error when connecting to a remote MySQL database?
採用された回答
MathWorks Support Team
2020 年 6 月 2 日
This appears to be a server-side authentication issue with the MySQL database.
1) Please ensure the driver version for the JDBC connection is compatible with the version of the MySQL database you are trying to connect to.
2) Please specify the parameter "useSSL=false" in the URL of JDBC connection:
>> driverpath = 'C:\xxxxxx\mysql-connector-java-X.X.XX.jar';
>> opts = configureJDBCDataSource('Vendor','Other');
>> opts = setConnectionOptions(opts,'DataSourceName','SQLServerDataSource',...
'URL','jdbc:mysql://<hostname or ip address>/<database-name>?useSSL=false&',...
'Driver','com.mysql.cj.jdbc.Driver',...
'JDBCDriverLocation',driverpath);
username = 'exampleUsername';
password = 'examplePassword';
[status, error] = testConnection(opts,username,password)
3) If these steps fail, please contact your database administrator to troubleshoot authentication and connectivity issues.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Database Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!