Page 1 of 1

Connecting to remote MySQL SB port 3307

Posted: Wed Dec 27, 2017 10:31 am
by PeterG
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

Re: Connecting to remote MySQL SB port 3307

Posted: Wed Dec 27, 2017 4:09 pm
by MaxV
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

Re: Connecting to remote MySQL SB port 3307

Posted: Thu Dec 28, 2017 2:52 pm
by PeterG
Thanks for the pointer
Best

Peter G