Page 1 of 1
connecting to db on-rev.com
Posted: Sun Sep 21, 2014 4:47 pm
by emmefisch
Hi
When I connect to my db on the server on-rev.com I get this error: unable to connect to the database: Unknown MySQL server host "frediger.on-rev.com"
All my parameters in revOpenDatabase are correct. Where is the problem? Any Idea?
put revOpenDatabase("mysql", "frediger.on-rev.com", "xxxxxx", "xxxxxx", "xxxxxx") into tResult
if tResult is a number then
put tResult into gConnectionID
answer info "Connected to the database." & cr & "Connection ID = " & gConnectionID
else
put empty into gConnectionID
answer error "Unable to connect to the database: " & cr & tResult
end if
Re: connecting to db on-rev.com
Posted: Sun Sep 21, 2014 5:13 pm
by Klaus
Grüezi Fredi,
I xxxx-ed out the database name, your username and password!
No idea, just guessing, but maybe you need to add "
www.frediger.on-rev.com"?
Modern internet browsers may be smarter than revdb and do NOT need this
Best
Klaus
Re: connecting to db on-rev.com
Posted: Sun Sep 21, 2014 7:57 pm
by emmefisch
Grüezi Klaus
and thank you for the xxx

.
It is the server from runrev and it is exact the code from the example - but it does not function....
Re: connecting to db on-rev.com
Posted: Sun Sep 21, 2014 8:19 pm
by Simon
Hi emmefisch,
In your cPanel there is also a security setting in Remote MySql (Remote Database Access Hosts) make sure you have allowed your or everybody's (%) domain access.
Simon
Re: connecting to db on-rev.com
Posted: Tue Sep 23, 2014 5:21 am
by emmefisch
Hi Simon
Thank you - i added % in the host list. But the error message is still the same...
Re: connecting to db on-rev.com
Posted: Tue Sep 23, 2014 5:31 am
by emmefisch
Oooops, I have written my databaseaddress false - sorry! Now I get this error-message:
Unable to connect to the database: access denied for user xxx@% to database xxxx
the username and databasename ar correct

in the access host list i added %
Re: connecting to db on-rev.com
Posted: Tue Sep 23, 2014 5:44 am
by Simon
Hi emmefisch,
Sorry, but this goes beyond liveCode.
I can tell you that I can successfully connect to MySQL via liveCode on on-rev.com.
I've just changed my UserName to something incorrect and I get the error message you see.
Double check your Database Name and Privileged User from cPanel MySQL Databases.
Simon
Re: connecting to db on-rev.com
Posted: Tue Sep 23, 2014 6:15 am
by emmefisch
Hi Simon
Thank you for your help - i have found now the error (my error)

I have forgotten to define the access-rights for the user. Now it does function. Thanx.
Regards, Fredi