-1

Hi I've just created my new linux server and have yum installed various modules which all seem to be working ok now. My trouble comes from mysql. It's installed and running but when I and connect from my windows machine I get mysql error 2003.

I've read stuff about firewalls and binding ip addresses but none seem to apply or I've tried already, can anyone help.

Edit: mysqld log file says (this from a tail so seems all ready to go):

InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
130115 11:05:02  InnoDB: Started; log sequence number 0 0
130115 11:05:02 [Note] Event Scheduler: Loaded 0 events
130115 11:05:02 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.66'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution

My config is here

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

Which again seems ok, if there is anymore information you can need to make a suggestion please let me know.

I've got the root user up to have access from localhost and localhost.localdomain and from Any hosts as well that's mostly from the default install. There seems to be no passwords set up, and I've tried with my root password and no password.

MadHatter
  • 78,442
  • 20
  • 178
  • 229
  • You need to do some work on your own before asking a question here, and provide us some information to go on - this question is like calling your doctor and saying "My arm hurts!" - you could have bruised it walking into a door, or chopped it off with an axe, and there's no way to know which without more information. See [How can I ask better questions on Server Fault](http://meta.serverfault.com/questions/3608), improve this question, and it may be reopened. – voretaq7 Jan 21 '13 at 16:39
  • Yeah, it is a little vague but I'm unsure about what information you require - if you could point me in the right direction that would help. – Richard Housham Jan 22 '13 at 12:45
  • Please take the time to *read the information at the link I provided* - it's all described there quite thoroughly. In your case relevant portions of your MySQL log and configuration file would be a minimum starting point... – voretaq7 Jan 22 '13 at 16:34
  • Your questions is very vague. On the local linux/mysql box, can you login to mysql? `mysql -u root -p`. If you can login, then mysql is working fine. Its probably a case of firewall blocking it. – Sc0rian Jan 24 '13 at 10:42
  • From the windows client (or any other local system that isn't the server), what do you get if you do `telnet ip.addr.of.server 3306`? – MadHatter Jan 24 '13 at 10:59
  • I would 1. telnet onto this port (3306) to check whether the port is open. 2. Check mysqld process existence with pgrep -fl mysqld 3. Check if mysql is listening somewhere : netstat -atnp | grep -E "mysql|3306" – wojciechz Jan 29 '13 at 01:23

1 Answers1

0

If you are able to connect mysql from localhost, check following.

  1. Make sure MySQL is running on the external (LAN) IP, not only on loopback (localhost), by default it set to run on loopback interface, comment bind = 127.0.0.1 in my.cnf and restart mysql to get rid of this.
  2. Make sure port 3306 is open to required machines (for your Windows machine in this case).
  3. Make sure Windows firewall allows outbound traffic.

Thanks, Meghanand

vasco.debian
  • 306
  • 2
  • 13
  • Thanks, for your help but there is no bind = 127.0.0.1 in my.cnf 3306 must be open because I can connect to external databases and all that is through 3306 Again I must presume that windows allows outbound traffic as I can access other mysql databases not on my local server and other sits via ftp. Hope you can help further thanks. I'm logging into my mysql database using my servers ip address - is this correct? Richard – Richard Housham Jan 25 '13 at 13:17
  • Please try few more steps, login to linux server and do `netstat -tlpn | grep 3306` which makes sure mysql is running on all interfaces (0.0.0.0:3306), Try connecting to it from some other linux machine if you have, I think something is wrong at client (Windows) side error code 2XXX indicates client errots see http://dev.mysql.com/doc/refman/5.1/en/error-messages-client.html for more information. – vasco.debian Jan 25 '13 at 18:47