This forum is no longer active. Please post your questions to our new community site
Error Logging in to mysql
|
|
Whenever I try to login to mysql on my macbook I get this error: ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/Applications/mampstack-1.2-0/mysql/tmp/mysql.sock’ (2) I was looking online and it was saying this error occurs because it’s looking for mysql.sock in the wrong location. I was going to edit the mysql.cnf file and change the location in the file to the correct location for mysql.sock but when I search for mysql.sock it isn’t showing up anywhere on my machine. I am new to this so any suggestions would be greatly appreciated. Thanks for your help. Bill |
|
|
Hi Bill, Is the MySQL database running? You can check it using this command in a Terminal:
You can start it using:
Cheers. |
|
|
Thank you Beltran, that was the problem but now I’m getting a different error: ERROR 1045 (28000): Access denied for user ’snag49ers’@’localhost’ (using password: YES) Not sure why I’m getting this. I’m using this command to login: $ ./mysql -u wj1031 -p Do I need to specify a host? I didn’t think I needed to since I’m using my local machine. Thanks again. |
|
|
Hi Bill, You should use the “root” user to connect to MySQL:
The password is the same that you set during the installation. Cheers. |
|
|
Thanks again Beltran. Is there any way for me to edit something in a script that would start mysql automatically whenever i start my mac? |
|
|
Hi, Yes, we wrote a post about how to install BitNami Stack as a service on OS X http://bitnami.org/article/how-to-install-servi… I hope it helps |

