Allow Mysql Remote incoming Connections

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
User avatar
Spiritwind
A semi-regular
A semi-regular
Posts: 17
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Mon Jul 09, 2012 2:51 pm
Location: Prineville, Oregon
Contact:

Allow Mysql Remote incoming Connections

Post by Spiritwind »

Hey guys,
I've been working the last 5 hours trying to get the Mysql server on my VDS to accept incoming connections.

I've looked up hundreds of guides on how to do so -- and managed to screw the mysql server up to the point of having to do a complete wipe of it several times :P.

I'm using Ubuntu and trying to connect via a web interface in PHP (works with other mysql servers, however it does not work with this one...).

I've tried granting permissions from external Ips for the root account and a secondary account I made.

I've tried commenting out the
bind-address = 127.0.0.1
in my.cnf - and then restarting the server

I've tried opening up the 3306 port on the VDS.

Pretty much the only thing I havent tried is changing the mysql default port incase there is another firewall or something on the VDS blocking external 3306 traffic as I have 5 Minecraft servers with multiple plugins using the mysql server on the VDS (Would be a pain to cfg all of them to a new port).

If anyone has any other idea, that'd be awesome. If I do indeed need to change the port the mysql server is on, please let me know. If so, what port would you recommend?

Thanks a ton!
Image
User avatar
Spiritwind
A semi-regular
A semi-regular
Posts: 17
Joined: Mon Jul 09, 2012 2:51 pm
Location: Prineville, Oregon
Contact:

Re: Allow Mysql Remote incoming Connections

Post by Spiritwind »

I'm also using the IP I use to connect to SSH and sFTP with on the PHP page.
Image
User avatar
Edge100x
Founder
Founder
Posts: 12962
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Allow Mysql Remote incoming Connections

Post by Edge100x »

Try setting bind-address to either your VDS' IP address or to 0.0.0.0 (which means all IPs). Commenting it out would likely not work.
User avatar
Spiritwind
A semi-regular
A semi-regular
Posts: 17
Joined: Mon Jul 09, 2012 2:51 pm
Location: Prineville, Oregon
Contact:

Re: Allow Mysql Remote incoming Connections

Post by Spiritwind »

I just tried that;
Still nothing :(.

I also went through and did this -- same thing -- just having no luck with this.

http://www.howtogeek.com/howto/programm ... -any-host/
Image
User avatar
Edge100x
Founder
Founder
Posts: 12962
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Allow Mysql Remote incoming Connections

Post by Edge100x »

What is the exact error message that you're receiving when you try to connect?
User avatar
Spiritwind
A semi-regular
A semi-regular
Posts: 17
Joined: Mon Jul 09, 2012 2:51 pm
Location: Prineville, Oregon
Contact:

Re: Allow Mysql Remote incoming Connections

Post by Spiritwind »

Unable to connect, check connection information is correct

This is the plugin that I'm using (For Minecraft);
http://dev.bukkit.org/server-mods/ban-management/

Nobody else is reporting this error, and it works great when I connect to my old hosting companies Mysql (is preinstalled though).
Image
User avatar
Edge100x
Founder
Founder
Posts: 12962
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Allow Mysql Remote incoming Connections

Post by Edge100x »

Does it provide a better error message anywhere? That is unfortunately a very generic one. We need to know whether the login/password is being rejected, whether it's finding the port closed or not responding, or whether the host is being denied, or you'll waste your time potentially chasing down ghosts.

Without a better error, the next step should be for you to try to connect through the mysql command-line. Can you do it, and is your login accepted? Can you then select the database and manipulate the same table(s) that it would be using?
User avatar
Spiritwind
A semi-regular
A semi-regular
Posts: 17
Joined: Mon Jul 09, 2012 2:51 pm
Location: Prineville, Oregon
Contact:

Re: Allow Mysql Remote incoming Connections

Post by Spiritwind »

Do you perhaps have a PHP script I can configure and put onto the website to provide better details? Sadly, the page I am using does not give anything more than that.
Image
User avatar
Spiritwind
A semi-regular
A semi-regular
Posts: 17
Joined: Mon Jul 09, 2012 2:51 pm
Location: Prineville, Oregon
Contact:

Re: Allow Mysql Remote incoming Connections

Post by Spiritwind »

Managed to find one -- here is the Response I got after entering the details;

Lost connection to MySQL server at 'reading initial communication packet', system error: 111
Image
User avatar
Spiritwind
A semi-regular
A semi-regular
Posts: 17
Joined: Mon Jul 09, 2012 2:51 pm
Location: Prineville, Oregon
Contact:

Re: Allow Mysql Remote incoming Connections

Post by Spiritwind »

Sorry for so many posts in a row, I got it to change error messages via binding the address again in my.cnf

Access denied for user 'web'@'sabretooth.dreamhost.com' (using password: YES)

So its a matter of the Mysql server denying permission from my webhost, which is strange giving that I granted all permissions to the user with the Wildcard for IP.
Image
User avatar
Spiritwind
A semi-regular
A semi-regular
Posts: 17
Joined: Mon Jul 09, 2012 2:51 pm
Location: Prineville, Oregon
Contact:

Re: Allow Mysql Remote incoming Connections

Post by Spiritwind »

Alright, thank you very much for your help!

GRANT ALL ON *.* TO username@'%.dreamhost.com' IDENTIFIED BY 'myPassword;

Fixed the problem (For anyone that may have this problem in the future).

Thanks a ton!
Image
User avatar
Edge100x
Founder
Founder
Posts: 12962
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Allow Mysql Remote incoming Connections

Post by Edge100x »

I'm glad you were able to find the problem :)
Post Reply