connecting to a remote mysql database using jdbc connector (Mac)

조회 수: 8 (최근 30일)
Ronald Funderburk
Ronald Funderburk 2017년 1월 27일
답변: Piyush Kumar 2024년 10월 27일
I'm having difficulty configuring my environment to connect to a remote mySql database. I'm able to use the GUI, but not a script to connect / query my remote database.
Here's the scrip that I'm using to execute ... masked of course ... do I need to point to the jdbc connector? url? how to update the javaclasspath.txt file?
conn = database(db_Name,db_User_name,dbpassword, 'Vendor','MySQL','Server’,’ip.address.xx.xxx.xx’, 'PortNumber', 3306);
myQuery='select * from RETURNS';
curs=exec(conn,myQuery);
mycurs=fetch(curs);
curs.Data;
  댓글 수: 1
Geoff Hayes
Geoff Hayes 2017년 1월 29일
Ronald - please clarify what you mean by I'm able to use the GUI. Which GUI?

댓글을 달려면 로그인하십시오.

답변 (1개)

Piyush Kumar
Piyush Kumar 2024년 10월 27일
Hi,
Database Toolbox connects to any relational ODBC-compliant or JDBC-compliant database using ANSI SQL. To connect to Database Toolbox, you need the database-specific ODBC or JDBC driver installed on your computer.
If the issue is related to the JDBC driver, download it from this link and add it to the MATLAB search path.
To add the downloaded jar file to the path, Go the location where you have downloaded the jar file, right click and select "Add to Path" => "Selected Folders and Subfolders".
OR
You can use the javaaddpath function.

카테고리

Help CenterFile Exchange에서 Database Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by