Connecting to remote MySQL SB port 3307

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
gagsoft
Posts: 168
Joined: Sat Jun 29, 2013 7:56 pm

Connecting to remote MySQL SB port 3307

Post by gagsoft » Wed Dec 27, 2017 10:31 am

Hi Guys

I am trying to figure out to insert the port as a parameter in the connection string>
put "mysql" into theDBType
put "196.220.60.233" into theDBHost
put "3307" into theDBPort
put "Mydatabase" into theDBName
put "User" into theDBUser
put "MyPassword" into theDBPassword
Adding theDBPort as a parameter in the following connection string does not seem to work:
put revOpenDatabase( theDBType, theDBHost, theDBPort, theDBName, theDBUser, theDBPassword ) into theConnectionID
any pointers would be appreciated

MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: Connecting to remote MySQL SB port 3307

Post by MaxV » Wed Dec 27, 2017 4:09 pm

Wrong syntax:

Code: Select all

revOpenDatabase("mysql", host [: port], databaseName, [userName], password],[sslOption],...)
So you should do this:

Code: Select all

put "mysql" into theDBType
put "196.220.60.233" into theDBHost
put "3307" into theDBPort
put theDBHOST & ":" & theDBport into theCorrectURL
put "Mydatabase" into theDBName
put "User" into theDBUser
put "MyPassword" into theDBPassword
put revOpenDatabase( theDBType, theCorrectURL, theDBName, theDBUser, theDBPassword ) into theConnectionID
See: http://livecode.wikia.com/wiki/RevOpenDatabase
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

gagsoft
Posts: 168
Joined: Sat Jun 29, 2013 7:56 pm

Re: Connecting to remote MySQL SB port 3307

Post by gagsoft » Thu Dec 28, 2017 2:52 pm

Thanks for the pointer
Best

Peter G

Post Reply

Return to “Databases”