LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-02-2011, 09:14 AM   #1
sir-lancealot
Member
 
Registered: Aug 2007
Posts: 346

Rep: Reputation: 31
MySQL remote connect failing


Setup a new database on a machine I didn't setup. I can from the local machine issue a;

mysql -u root -p <enter>, submit the password and I'm in.

I read through
http://dev.mysql.com/doc/refman/5.1/...ss-denied.html

and not sure on the issue. If I submit from the remote server;
mysql -u remote.server.ip -p <enter> I get prompted, I enter the root password and get the following;
ERROR 1045 (28000): Access denied for user 'root'@'' (using password: YES)

I try it using;
mysql -u root -h remote.server.ip -p <enter>
I get prompted, but regardless to a good or bad password it just sits there.

I did connect locally, and did a;
GRANT USAGE ON *.* to root@'myremoteIP' IDENTIFIED BY 'rootpassword';

and figured that was it, but I read on bind addressing, etc. but if I get the password prompt, does that rule that stuff out?

A ps on that box shows;
/bin/sh /usr/local/mysql/bin/safe_mysqld

So not sure if that helps at all either.

Thanks
 
Old 01-02-2011, 09:38 AM   #2
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Rep: Reputation: 77
Did you follow this guide and configure the 'my.cf' file for remote connections?

http://www.cyberciti.biz/tips/how-do...se-server.html

You will need to bind the server I.P. to the following entry in the file:

Code:
bind-address    = 65.55.55.2

Last edited by carlosinfl; 01-02-2011 at 09:44 AM.
 
Old 01-02-2011, 06:09 PM   #3
sir-lancealot
Member
 
Registered: Aug 2007
Posts: 346

Original Poster
Rep: Reputation: 31
Almost got it. I did look at a similar page, have the bind-to set, but can't connect remotely due to firewall rules. I have 3306 open to the IP, but when I stop iptables I do get in, I start IPtables, I can't. So I am thinking it's an outbound rule, so will look more into that...

Thanks.
 
Old 01-03-2011, 07:27 AM   #4
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Rep: Reputation: 77
Sorry I'm not more familiar with IPtables or your specific Firewall but sounds like you're in the right direction.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote Connect To Mysql Server pau_kacang Slackware 4 07-01-2010 12:00 PM
[SOLVED] How to connect qmail / vpopmail to remote mysql server pragma_josh Linux - Server 3 05-14-2010 08:26 PM
Cannot connect to remote MySQL server using SSH tunneling nikhil010586 Linux - Server 10 03-18-2009 04:32 PM
Remote MySQL connection failing jamsda Linux - Server 2 12-16-2007 06:21 PM
mysql: can't connect from remote since restarted! Shioni Linux - Server 1 12-06-2006 11:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration