Dedi can't connect to web host database

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
Post Reply
Viper.
A regular
A regular
Posts: 38
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Fri Aug 21, 2009 11:28 pm

Dedi can't connect to web host database

Post by Viper. »

Not sure if this should be in the other section but what the hell..

Basically, our Dedi has stopped connecting to the MySQL database on NFO. This is what they say should fix it. I have the "Allow external connections" box ticked.

The SQL query I ran is this:

Code: Select all

GRANT ALL ON n00b101_sb.* TO 'n00b101'@'66.151.138.180'
And I get this error:

Code: Select all

#1044 - Access denied for user 'n00b101'@'localhost' to database 'n00b101_sb'
This is the part of databases.cfg if anyone is familiar.

Code: Select all

	"sourcebans"
	{
		"driver"			"mysql"
		"host"				"208.146.35.1"
		"database"			"n00b101_sb"
		"user"				"n00b101"
		"pass"			"**"
		//"timeout"			"0"
		"port"			        "3306"
	}
It's only stopped working recently, and by recent I mean the beginning of December. Anyone know of a fix? Sourcebans weren't much help so I thought I'd ask the fine folks here. :)
User avatar
Edge100x
Founder
Founder
Posts: 13126
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Dedi can't connect to web host database

Post by Edge100x »

All our MySQL databases allow access from any IP with a reverse DNS ending in "nfoservers.com" or "nuclearfallout.net". Have you changed the reverse DNS entry for the IP you are using to connect?

If you have changed your reverse DNS entry, you'd need to check the "Allow external connections" box for your MySQL database. You can do this from the "Databases" page of the control panel for your webhosting account here.

If you haven't changed the reverse DNS entry, I'd need to know the exact error that SourceBans is giving you.
Viper.
A regular
A regular
Posts: 38
Joined: Fri Aug 21, 2009 11:28 pm

Re: Dedi can't connect to web host database

Post by Viper. »

I haven't changed any DNS entries and the "allow external connections" box is ticked anyway.

The exact error from the sourcebans.log file is..

Code: Select all

L 12/30/2009 - 15:45:39: [sourcebans.smx] Database failure: [1045]: Access denied for user 'n00b101'@'d-66-151-138-180.dedicated-machine.internap-sj.nfoservers.co' (using password: YES)
User avatar
Edge100x
Founder
Founder
Posts: 13126
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Dedi can't connect to web host database

Post by Edge100x »

It looks like MySQL may be cutting off the host name, for some reason. I'll have to think of another abbreviation to use that would be shorter.
Viper.
A regular
A regular
Posts: 38
Joined: Fri Aug 21, 2009 11:28 pm

Re: Dedi can't connect to web host database

Post by Viper. »

Ok. Thanks for looking into it. :)
User avatar
Edge100x
Founder
Founder
Posts: 13126
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Dedi can't connect to web host database

Post by Edge100x »

I've adjusted this a bit for you now -- please let me know if it helps.
Viper.
A regular
A regular
Posts: 38
Joined: Fri Aug 21, 2009 11:28 pm

Re: Dedi can't connect to web host database

Post by Viper. »

Still getting the same error I'm afraid...

Code: Select all

L 01/01/2010 - 13:24:09: [sourcebans.smx] Database failure: [1045]: Access denied for user 'n00b101'@'d-66-151-138-180.dedicated-machine.internap-sj.nfoservers.co' (using password: YES)
DontWannaName
This is my homepage
This is my homepage
Posts: 75
Joined: Tue Feb 06, 2007 8:06 pm

Re: Dedi can't connect to web host database

Post by DontWannaName »

Are you sure you gave yourself full mysql access to that username and the password is correct?
User avatar
Edge100x
Founder
Founder
Posts: 13126
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Dedi can't connect to web host database

Post by Edge100x »

It's strange that it would give that error, because your reverse DNS is now d-66-151-138-180.ded-machine.internap-sj.nfoservers.com. I'll try clearing the MySQL host cache on my end.

It shouldn't matter, though, since you have external connections enabled (any remote host should work). Along the lines of what DWN said, have you changed your password recently?
Viper.
A regular
A regular
Posts: 38
Joined: Fri Aug 21, 2009 11:28 pm

Re: Dedi can't connect to web host database

Post by Viper. »

New error!

Code: Select all

L 01/02/2010 - 06:30:54: [sourcebans.smx] Database failure: [1045]: Access denied for user 'n00b101'@'d-66-151-138-180.ded-machine.internap-sj.nfoservers.com' (using password: YES)
How do I give access to that username? The query in the OP didn't work. And I have never changed the password.
User avatar
Edge100x
Founder
Founder
Posts: 13126
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Dedi can't connect to web host database

Post by Edge100x »

Is it choosing the right database name when it connects? Are you able to connect to that database locally on the hosted machine (through phpmyadmin or the like), using the same username and password combo?

I checked, and n00b101@%.nfoservers.com is a valid user in the system, with access to several databases.
Viper.
A regular
A regular
Posts: 38
Joined: Fri Aug 21, 2009 11:28 pm

Re: Dedi can't connect to web host database

Post by Viper. »

I still get access denied just from a php script.

http://66.151.138.180/test.php

The same script on the server local to the database connects fine..

http://n00bs101.com/test.php
User avatar
Edge100x
Founder
Founder
Posts: 13126
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Dedi can't connect to web host database

Post by Edge100x »

Could you try changing your database password or creating a new database?
Viper.
A regular
A regular
Posts: 38
Joined: Fri Aug 21, 2009 11:28 pm

Re: Dedi can't connect to web host database

Post by Viper. »

Well I finally got it to work. A brand new database didn't work even though I could connect to it using the php script (the server still wouldn't connect). So I simply changed the password et voila... it magically worked. :D

Very strange indeed but thanks for the help.
Post Reply