Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a dedicated server (CentOS 5.3) but I can't log on to mysql as admin from outside, however I can do that when I'm on server's command line. I assume there's a setting somewhere that can give me the access I need, but I don't know where.

share|improve this question
up vote 2 down vote accepted

There are several factors and your question doesn't include enough information to know which of these you are up against.

First make sure your server is listening on your network port. Listening on just will not cut it since that only allows loop-back connections to the localhost. You need to listen on


Next make sure you are using TCP networking at all. Mysql can use just local sockets, so make sure this line is commented out in your config:


That done you should have a mysqld daemon listening. You can test like this:

# netstat -lntp | grep mysqld
tcp        0      0*               LISTEN      2652/mysqld

(Note that my sample output is only listening on localhost! Yours should read with your interface IP or if this is going ot work.)

Lastly you need to have the right privileges setup in mysql itself. Each user has a host that it is allowed to connect from. If you ran your GRANT statements and only gave permissions ON 'localhost' or something like that, you still won't be able to login remotely. You need to include the specific host you want to allow or '%' for any host.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.