LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 02-29-2012, 10:38 AM   #1
sir-lancealot
Member
 
Registered: Aug 2007
Posts: 336

Rep: Reputation: 31
mysql connect remote as root works, user fails


I have a client with a remote mysql server they are trying to monitor with zenoss. The template is added, working fine, but failing on connect. They are on the same network, skip-grant I believe is running, and I can issue the following as root on that box;

root@server log]# mysql -h mysql1
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 180057844
Server version: 5.1.50-community-log MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>


Now, when I switch to the zenoss user, and issue the same command, it simply fails;

[zenoss@server log]$ mysql -u 'root' -h 'mysql1' -P '3006'
ERROR 2003 (HY000): Can't connect to MySQL server on 'mysql1' (110)


I am not sure if that's a 'mysql' type thing that I need to look at, or more the OS itself (like environments, etc.) but looking up that error is too vague and you get sooo many.

Thanks for looking and and help or direction is appreciated.
 
Old 02-29-2012, 10:44 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
the same command? That's not the same command at all. You've added a port number and it is non standard. Mysql runs on port 3306 by default, not 3006, so maybe that's it.
 
Old 02-29-2012, 10:50 AM   #3
sir-lancealot
Member
 
Registered: Aug 2007
Posts: 336

Original Poster
Rep: Reputation: 31
Sry, been looking and my eyes are starting to bleed, didn't even see that typo. The irony is when I changed that port to the correct one (really can't believe I posted that one!) it worked.

[zenoss@mysql log]$ mysql -h mysql1 -u root -P 3306
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 180092945
Server version: 5.1.50-community-log MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

So the good news is I can connect, I just need to look back and maybe force the port, because when I tried w/o the port completely;
[zenoss@mysql log]$ mysql -h mysql1 -u root it just fails with that error.

Thanks for the quick look and find, hate when I overlook the obvious!
 
  


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
DBI connect failed : Access denied for user 'root'@'%' to database 'mysql' kwickcut Linux - Software 11 02-10-2012 03:26 PM
ssh Works, Remote Mount Fails Quantumstate Linux - Security 10 05-05-2011 06:12 PM
LDAP Authentication Fails for Non-Root, but works for root ludwig Linux - Server 2 08-16-2008 06:53 PM
"su root" fails when I connect with normal user thru SSH AlinFaur Linux - Security 5 02-23-2006 12:26 AM
Connect to mysql as non root(linux) user dublinclontarf Slackware 1 02-09-2004 05:19 AM


All times are GMT -5. The time now is 03:03 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration