Posts: 201
Threads: 39
Joined: Oct 2011
Hello,
I've bought a hosted server from KingJ.net and when I'm trying to start my server I'm getting a error tells me the access denied to the mysql database.
I'm using XAMMP/PHPMYADMIN on my localhost to link between the game mode to the database.
Should I use KingJ Mysql if i want it to work?
Posts: 1,600
Threads: 3
Joined: May 2011
Reputation:
0
You may have your MySQL connection details wrong.
If your trying to connect outside of the network to a database, the host field needs to be the IP address of the mysql server.
Posts: 201
Threads: 39
Joined: Oct 2011
I'm using XAMPP I'm not using KingJ database.
XAMMP is running on my localhost.
Still I have to put the IP as a hostname?
Posts: 1,228
Threads: 133
Joined: Oct 2009
Reputation:
0
....
just use kingj's mysql. How do you expect to connect with localhost from kingj to ur home ip...
Posts: 201
Threads: 39
Joined: Oct 2011
Well there is no option for the client to do that in KingJ obviously. I got to wait them to make a database for me.
Just thought could do that with XAMMP..
Posts: 1,228
Threads: 133
Joined: Oct 2009
Reputation:
0
Well in that case, yes, put your ip.
IP
user: root (or w/e user you are using)
password: (blank sometimes)
Posts: 201
Threads: 39
Joined: Oct 2011
01.05.2012, 03:03
(
Последний раз редактировалось AdamCooper; 01.05.2012 в 14:23.
)
IP of the server or my computers? If it's the computers localhost should work?
Edit :
I've changed to the computer IP and it still didnt work .
Token from server logs :
00:23:32] Filterscripts
[00:23:32] ---------------
[00:23:32] Loading filterscript 'gate.amx'...
[00:23:32] Unable to load filterscript 'gate.amx'.
[00:23:32] Loaded 0 filterscripts.
[00:23:32] MYSQL: Attempting to connect to server...
[00:23:32]
Connection to MySQL database: Failed !
[00:23:32] Access denied for user 'root'@'localhost' (using password: YES)
[00:23:32] Error in mysql_select_db: MySQL server has gone away
[00:23:32] MYSQL: Connection error, retrying...
[00:23:32]
Connection to MySQL database: Failed !
[00:23:32] Access denied for user 'root'@'localhost' (using password: YES)
[00:23:32] Error in mysql_select_db: MySQL server has gone away
[00:23:32] MYSQL: Could not reconnect to server, terminating server...
[00:23:32] Error in mysql_query: MySQL server has gone away
[00:23:32] Error in mysql_store_result: MySQL server has gone away
Here are the script lines :
#define MYSQL_HOST "79.183.30.69"
#define MYSQL_USER "root"
#define MYSQL_PASS ""
#define MYSQL_DB "kokot"
Using XAMMP/PHPMYADMIN username called root and password same as above. database name also the same.
What could be the problem?
Posts: 365
Threads: 4
Joined: Feb 2008
Reputation:
0
If you're connecting to your own local MySQL database from our servers (or anyone else's for that matter) you'll need to use your external IP and ensure that you have unfirewalled and forwarded the port as appropriate.
However, hosting a MySQL database anywhere other than the same location as your server is a very bad idea. As MySQL queries are a blocking operation (except for threaded queries) you will experience significant lag if you use an external MySQL server. Due to this, we offer free local MySQL hosting for databases, indeed I believe most hosts offer this because of the issues with external databases.
I have replied the support ticket you submitted a few hours ago with details for your new MySQL database. Please let us know, preferably via the ticket as we check that more often than the forums, if you have any further problems or questions.
You also appear to have listed your MySQL root password in your previous reply, you may want to remove that and change your password.
Posts: 201
Threads: 39
Joined: Oct 2011
Okay thanks, I've got the database information.
Though, now I'm facing a new problem. I've made a ticket for it. See ya there.