A question involving MySQL

Status
Not open for further replies.

UltimateSephiroth

New Member
Messages
27
Reaction score
0
Points
0
Hi, I'm UltimateSephiroth and I come from Finland.

I've shortly registered myself an account 'gmmaster' and the subdomain 'mecharena.elementfx.com'. I'm just starting off with MySQL but I have to ask a question.

I can access my database 'MechArenaLog' by my PHP document http://mecharena.elementfx.com/mysql_test.php. However, this is not exactly what I am looking for. The situation is that I make games using Game Maker (see www.yoyogames.com) and I use a DLL which should make MySQL available. However, I seem not to get the settings right. The game just returns "Can't connect to MySQL server on 'database.x10hosting.com' (10061)".

The code I'm using is:
gmsql_connect("database.x10hosting.com:3306","gmmaster_MAdef","**********","gmmaster_MechArenaLog")
(without the space in username & having the correct password in the place of those asterisks)

and the syntax is:
-----------------------------------------------------------------------------------------------------------------------------
gmsql_connect(host[:port],username,password,database)
-----------------------------------------------------------------------------------------------------------------------------

Connects to the given database server location with the specified credentials.

host[:port]:

Specifies the location of the MySQL database server. You can either use a TCP/IP address or an URL. Optionally, a port number can be specified behind a colon.

username:

The user name to log on with.

password:

The password corresponding to the username.

database:

Name of the database to connect to. Pass an empty string if you wish to connect to a database at a later stage.

Example:

if !gmsql_connect('215.241.221.124:2031','player','secret','asteroids') show_message(gmsql_errormessage());

Logs on to the server located at 215.241.221.124 with port number 2031 as user 'player' with password 'secret', connecting to database 'asteroids'.

Returns 1 if connection was successful and 0 when failed. Check gmsql_errorcode() and gmsql_errormessage() for more information on failure.

Also, I've allowed %.x10hosting.com and my own IP in the remote MySQL settings. However, I always seem to get the same error. Is it even possible to connect there this way or am I doing something wrong?

Thank you in advance. :)
 

kajasweb

New Member
Messages
1,723
Reaction score
0
Points
0
Its not database.x10hosting.com, The MySQL Host name is mysql.x10hosting.com
 

UltimateSephiroth

New Member
Messages
27
Reaction score
0
Points
0
Okay, I changed it to mysql.x10hosting.com. Now what I get is that it hangs up for about 10 seconds and then returns:
"Can't connect to MySQL server on 'mysql.x10hosting.com' (10060)"

Note that the error is very similar to the one I told before, only the error code changed. Hmm...
 

UltimateSephiroth

New Member
Messages
27
Reaction score
0
Points
0
*Bump*

No ideas? 'Cause this thread had sunk to the 3rd page....

Also, I forgot to note that the reason I used database.x10hosting.com was that the PHPMyAdmin told me it is the server address. Also, when using it, it was the first time ever the error code was different than 10060.

I also recently updated my libMySQL.dll, but it didn't have any effect. :<
 

kajasweb

New Member
Messages
1,723
Reaction score
0
Points
0
I also recently updated my libMySQL.dll, but it didn't have any effect. :<

Are you trying to connect from your PC? If yes, you have to add your STATIC IP in Remote SQL Section of cPanel and Make a request to add your STATIC IP to the firewall to allow connections.
 
Last edited:
Status
Not open for further replies.
Top