jeudi 16 juin 2016

Can't access newly-installed mysql on mac osx 10.11.5

I had a previous version of MySQL on my MacBook Pro running osx 10.11.5. However I couldn't access mysql either as root or mysql user. So I figured that maybe I had passwords associated with those accounts and just forgot what they were. So I installed a fresh copy of the latest MySQL, whatever the version currently was as of a few hours ago, using the dmg file. The install was successful, according to the message on screen. However, I still couldn't access MySQL! I thought root came without a password by default, so that typing "mysql -u root" should have worked. So next I tried to reset the root password, but couldn't do that either. So now I'm stuck. After stopping mysqld using the little MySQL start/stop window in the system preferences, I had the following terminal session:

Vitit-Kantabutras-MacBook-Pro:~ vkantabu$ sudo mysqld_safe --skip-grant-tables &
[1] 4170
Vitit-Kantabutras-MacBook-Pro:~ vkantabu$ mysql -uroot
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

[1]+  Stopped                 
sudo mysqld_safe --skip-grant-tables

What went wrong?

Aucun commentaire:

Enregistrer un commentaire