0

Right now I do a netstat -n | grep 3306 and nothing come. Beside I try to connect using:

$ mysql -h127.0.0.1 -u root -p
Enter password: 
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (61)

to connect and see the error below. Even so, when I use:

$ mysql -hlocalhost -u root -p

no problem at all to connect to the server.

All this indicated me that MySQL Server installed the official installer on OS X 10.10 Yosemite, not allow networks connection to the server. How I enable that feature?

EDIT TO MAKE A POINT WY IS NOT A DUPLICATE QUESTION

Suggestions for solve this problem can be found in a lot of places like here, but none of those solutions worked for me. I will explain what I did, so MySQL on OS X gurus can suggest new things ;)

  1. I install MySQL following this guide

  2. Copy sample of my.cnf

    sudo cp /usr/local/mysql/support-files/my-innodb-heavy-4G.cnf /etc/my.cnf
    

I can stop and start the service using the Figure 2.49 MySQL Preference

I tested without success:

From here:

Just comment out bind-address= altogether. When you do that, it will bind to all addresses. Also make sure that you don't have skip-networking enabled in your my.cnf.

I tested with bind-address comment out as well as skip-networking comment out. I tested with bind-address = 127.0.0.1 and with bind-address = 192.168.1.77 too.

I really don't what else to do. I'm testing that MySQL server is not listening to any TCP port using two commands:

  1. netstat -n | grep 3306, showing nothing.

  2. mysql -h 127.0.0.1 -u root -p and mysql -h 192.168.1.77 -u root -p, receiving Can't connect to MySQL server on... error

Any Help?

  • I edited the question. Do I have to do anything else to this question not be considered a duplicated question? I think that the fact this is a Yosemite and MySQL 5.5.44 question could be make it unique and the answer unique and different respect to the others old questions similars to this one. –  Aug 15 '15 at 15:50
  • bind_address = 0.0.0.0 and check that you are running from config that you are edited. You can check it via command line. – Navern Aug 15 '15 at 23:35
  • Thanks @Navern for your reply. How exactly I can check that? I tested using *bind_address = 127.0.0.1*, *bind_address = 0.0.0.0* and bind_address = 192.168.1.77 but none of those variants worked. Right now I'm thinking that the file I'm editing */etc/my.cnf* is not the right one. [Here](https://dev.mysql.com/doc/refman/5.5/en/option-files.html) you can see that `/etc/my.cnf` file is read by the mysql deamon on OS X, but I can't find if any other file is being reading by MySQL to pick configuration values. Thanks again for your reply. –  Aug 16 '15 at 00:18
  • I am not pretty sure about OS X, you can find on linux how your mysql daemon is running with ps -eF | grep mysqld. Also i would use strace for start of mysql daemon to check from which log he takes config. Also you can try break config intentianally to see if it's used for your daemon. Try write you configuration to /etc/mysql/my.cnf – Navern Aug 16 '15 at 01:34
  • Thanks again @Navern `/usr/local/mysql/bin/mysqld --user=_mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --log-error=/usr/local/mysql/data/mysqld.local.err --pid-file=/usr/local/mysql/data/mysqld.local.pid --port=3307` that is the command line set for the installer, and as you can see, the port is 3307, no 3306, that was the problem ;) –  Aug 16 '15 at 05:53

0 Answers0