Author Topic: [Zentyal 3.0] mysql error 2002 [SOLVED]  (Read 2528 times)

dmdarki

  • Zen Monk
  • **
  • Posts: 69
  • Karma: +4/-0
    • View Profile
[Zentyal 3.0] mysql error 2002 [SOLVED]
« on: February 25, 2013, 09:35:53 pm »
I was trying to install phpmyadmin so i was changing the mysql root password with this link.

http://www.sururi.com/2011/02/change-mysql-password-on-zentyal.html

and i get this error

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

now i can't do anything else and I dont know how to repair it =/
« Last Edit: February 26, 2013, 07:17:08 pm by dmdarki »

half_life

  • Bug Hunter
  • Zen Hero
  • *****
  • Posts: 867
  • Karma: +59/-0
    • View Profile
Re: [Zentyal 3.0] mysql error 2002
« Reply #1 on: February 26, 2013, 04:37:03 am »
Why would you go through all that to add a password for a admin mysql user?  The key is to get logged in as root so that you can grant privileges to another user, no?  Or do you need it to be the root user? 

Anyways that doesn't help you in the immediate case.  Have you run sudo /etc/init.d/mysql restart   ?  Your error suggests that the mysql service is not running.

dmdarki

  • Zen Monk
  • **
  • Posts: 69
  • Karma: +4/-0
    • View Profile
Re: [Zentyal 3.0] mysql error 2002
« Reply #2 on: February 26, 2013, 07:16:50 pm »
hi and thanks for your reply.

why root ? because there is no other user to login mysql, and root user has a password unknown, and phpmyadmin need the root password for his installation.

sudo /etc/init.d/mysql restart does not work, the correct command is service mysql start or stop.

i really don't know what happened but i just turn on the server today and mysql is running fine, i have changed the password with the same code.

http://www.sururi.com/2011/02/change-mysql-password-on-zentyal.html

but i use "service mysql" instead of "/etc/init.d/mysql".

i have created a database and i can access with the root user, i will create another user with less privileges, but at this time the thread is solved.

thank you =D

half_life

  • Bug Hunter
  • Zen Hero
  • *****
  • Posts: 867
  • Karma: +59/-0
    • View Profile
Re: [Zentyal 3.0] mysql error 2002 [SOLVED]
« Reply #3 on: February 26, 2013, 10:49:45 pm »
<smile>  while the script /etc/init.d/mysql might complain that it has been converted to an upstart script I believe you will find it still performs the job function.  Good to hear that things worked out for you.  The password contained in /var/lib/zentyal/conf/ebox-zarafa-passwd is the root mysql password isn't it?