Invalid connection when connecting to MySQL.
11 ビュー (過去 30 日間)
古いコメントを表示
I wrote my code as official guide of database toolbox as follows:
myconn=database('xxx','yy','zzz','com.mysql.jdbc.Driver','jdbc:mysql://121.41.144.24:11106/xxx')
sqlquery = "SELECT * FROM dw_IndexQuote";
data = select(myconn,sqlquery);
However, it report an error that Invalid connection.
the attribute of the connection is:
AutoCommit: ''
ReadOnly: ''
LoginTimeout: 0
MaxDatabaseConnections: -1
I don't know why. The information of connection is correct and I can use python to connect. I think there may be a mistake in configuration but I cannot figure it out.
0 件のコメント
回答 (1 件)
Shanmuganathan
2022 年 11 月 22 日
Hi Chen,
I understand that you are facing an issue when trying to connect to MySQL database.
Please follow the below documentation to setup the data source and connect to MySQL database:
Regards,
Shanmuganathan
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!