Database error?

Matthias Rebbe | M-R-D matthias_livecode_150811 at m-r-d.de
Thu Apr 9 09:12:29 EDT 2015


Graham,

i just did a quick test on Diesel, which is the server where your account is hosted, and DB connections are working. 

Maybe a dumb question, but are you in any case trying to connect to the MySQL DB from your Livecode App/IDE ?

If so you need to

1. configure „Remote MySQL	“ in cPanel to allow the "remote access" to your DB.

2. use the following servername for connection  YOURACCOUNTNAME.on-rev.com
    if using localhost for the server the LC app/IDE tries to connect to a MySQL DB on your computer instead of connecting to your On-Rev MySQL DB.

Warning: Please be aware that configuring remoteAccess for MySQL for your on-rev account  is a security risk and should be avoided.


If you tried to connect from a LC server script then either your script is wrong or the On-Rev server is having some problems, maybe only with your account.

Try the following script. Create a file e.g. dbtest.lc, put the sample script into it and upload it to your public_html folder and open it in your browser:

http://YOURACCOUNTNAME.on-rev.com/dbtest.lc

 If the output is a number then connection works, otherwise you will see an error message in your browser


<?rev
set the errormode to "inline"
put revopendatabase("MYSQL","localhost“,"YOURDBANME“,“YOURDBUSERNAME not your accountname“,“YOURDBUSER PASSWORD") into tDBID
put tdBID 
 repeat for each item i in revopendatabases()
   revclosedatabase i
end repeat
?>


Regards,

Matthias


> Am 08.04.2015 um 20:28 schrieb Graham Samuel <livfoss at mac.com>:
> 
>> Can't connect to local MySQL server through socket '/tmp/mysql.sock'




More information about the use-livecode mailing list