Raised This Month: $51 Target: $400
 12% 

Server Error: (2003) Can't connect to MySQL server on 'db.myserver.com' (13)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CharlieMopps
New Member
Join Date: Jul 2016
Old 07-03-2016 , 17:22   Server Error: (2003) Can't connect to MySQL server on 'db.myserver.com' (13)
Reply With Quote #1

Ok, I've got everything installed, the server works, hlstats plugin loads. But when I navigate to my http page I get this:
Code:
ERROR
Database Error

Server Address: db.myserver.com
Server Username: hlx

Error Diagnostic:
Could not connect to database server. Check that the values of DB_ADDR, DB_USER and DB_PASS in config.php are set correctly.

Server Error: (2003) Can't connect to MySQL server on 'db.myserver.com' (13)

Last SQL Query:
I've a dedicated server that I have full access to (it's a Dell R710 in a rack) It's running virtualized servers. The one caveat to my setup is I have a database server, and am not hosting the db in the same vm as hlstats.

All of my vm's are running:
CentOS Linux release 7.2.1511 (Core)
PHP 5.4.16 (cli)

and the db is running:
MySQL server version 5.6.31

At first I could not run the cron jobs. I figured out that I had to install DBD which was difficult but it's working.

Now I can run the cron job scripts:

Code:
cd /home/fofserver/serverfiles/fof/addons/sourcemod/scripting/ && ./hlstats-awards.pl
-- Connecting to MySQL database 'hlstatsx' on 'db.myserver.com' as user 'hlx' ... connected OK
++ HLstatsX:CE Awards & Maintenance script version 1.6.19 starting...

++ Cleaning up database: deleting events older than 28 days... done
++ Cleaning up database: deleting player history older than 28 days... done
++ Cleaning up database: deleting stale trend samples... done
++ Cleaning up database: deleting server load history older than one year... done
++ Updating player activity... done
++ Processing awards... (generating awards for 2016-07-02 (previous: 2016-07-02))... done
++ Processing ribbons... done

++ HLstatsX:CE Awards & Maintenance script finished.
But, for some reason, the php is failing with some sort of error.
The login credentials are identical.
Any ideas?
CharlieMopps is offline
stoneyschillhouse
Senior Member
Join Date: Nov 2012
Old 07-07-2016 , 16:09   Re: Server Error: (2003) Can't connect to MySQL server on 'db.myserver.com' (13)
Reply With Quote #2

Hi

what is db.myserver.com ??? thats not your mysql server address?!

put in the IP adress of the mysql host

Did the mysql host allow external loggin ?
__________________
SRY FOR MY BAD ENGLISH
I'm german
stoneyschillhouse is offline
Grainz
Junior Member
Join Date: Jan 2016
Old 07-29-2016 , 14:32   Re: Server Error: (2003) Can't connect to MySQL server on 'db.myserver.com' (13)
Reply With Quote #3

I assume db.myserver.com is replaced with something for the sake of posting here but make sure your user for the db has access remotely.
Grainz is offline
micazoid
Veteran Member
Join Date: Oct 2010
Location: Munich - Germany
Old 07-29-2016 , 16:10   Re: Server Error: (2003) Can't connect to MySQL server on 'db.myserver.com' (13)
Reply With Quote #4

Check if ports are opened properly.

If HLpage and Databse are on the same server then try to replace db.myserver.com with 127.0.0.1

If not, then get the correct ip and try this instead of an url
__________________
micazoid is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:33.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode