MySQL Forums
Forum List  »  MySQL Query Browser

Re: MYSQL Error No 1130
Posted by: Guan Hsu
Date: August 24, 2010 05:18PM

You should not need to rebuild MySQL. Most likely, it is a configuration issue. Without knowing what your configuration is like (what OS, what Linux distro, what version of MySQL, what kind of network configuration, etc.) the following might not apply to any issue you face. Here is some general MySQL connection issue trouble shooting steps I wrote, starting from the simplest. Give it a try, and let me know if it helps.

Disclaimer: The examples are verified on RHEL/CentOS 5.5 with MySQL 5.0 installation. For the most part, I tried to keep it Linux distro independent if I can. It might even apply to BSD, or MacOS X. However, if you are running MySQL on Windows, sorry I cannot help. In any case, as they said, YMMV (your mileage might vary).

General MySQL Connection Trouble Shooting Steps:

1. Make sure the server you are connecting to is up and running:

ps ef | grep mysql

Do you see mysqld_safe, or mysqld running? If not, start mysql daemon:

service mysqld start

Otherwise, see MySQL doc (e.g. for MySQL 5.0) for your OS at

if you don't know how to start MySQL server.

2. Is your MySQL listening to the port you are trying connect? Default port is 3306. Do a

netstat -an | grep 3306

would verify that. Check your /etc/my.cnf file should tell you what port it is running on if it is not default port. Check with your admin if you cannot view the config file. If you can confirm that it is a non-standard port, make sure that you are connecting with that port, say, for example,

mysql --host <host> --port <number> --user <username> --password

3. Check to make sure you can connect from where you are connecting. Check your /etc/my.cnf file (it might be at a different location for different OS) and see if you have a statement like this:


If it is there, you have a problem connecting to mysql from anywhere other than localhost. You need to comment that out. That would allow all system to connect to mysql server. You need to secure mysql server with firewall rules. E.g.

Check with your network admin or read up on iptables tutorial if you don't know how.

4. Make sure your server firewall is not blocking access:

iptables -L

If you are not sure, a quick way is to flush the iptables rules first:

iptables -F

and see if that fix the problem. If it does, you can then add the rule you need to allow access. e.g.

iptables -IINPUT -p tcp --dport 3306 -s -j ACCEPT

If you are connecting from, say, via the default port.

5. Does your server allow the user you are using to connect from where you are connecting it from? From the server, get in as root

mysql --user root --password

assuming that you already set mysql root account password since you are concerned about security. Do the following sql select:

mysql> select Host, user, password from mysql.user;

You can vary the select statement if you want to limit the result. If you are connecting using username mysqlluser from say,, and you don't see that come up. The simplest way to grant access is do this:


You might want to tailor the privilege you grant by your need.

Mmm.... I think that covers a lot of ground for connection problems. Cannot think of what else can go wrong now. Give it a shot, and see what you can do with it. Let us know whether it works for you or not. If you still have problem, some specific of your installation might help.

Sorry that I am new to the forum. Need to figure out how to format it better. I'll try to add HTML tag next time.

Good luck!

Guan Hsu
Open Source Enthusiast

Options: ReplyQuote

Written By
July 27, 2010 10:33AM
Re: MYSQL Error No 1130
August 24, 2010 05:18PM
October 22, 2010 06:25AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.