Results 1 to 2 of 2

Thread: ERROR 2002 (HY000): Can't connect to local MySQL server through socket

  1. #1
    Join Date
    Mar 2011
    Beans
    1

    ERROR 2002 (HY000): Can't connect to local MySQL server through socket

    Goodday All,

    I have installed the mysql server on my ubuntu. I need to assign or reset the root password. I followed the article at http://www.ubuntugeek.com/reset-the-...-on-mysql.html. When I ran the command
    Code:
    mysql reset-password
    I get the error
    Code:
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
    and then I ran the command
    Code:
    mysqld_safe --skip-grant-tables
    then I got the following results
    Code:
    110509 09:09:58 mysqld_safe mysqld from pid file /var/lib/mysql/Richard-HP4520s.pid ended
    . Then I executed the command
    Code:
    mysql --user=root mysql
    and I got the following results
    Code:
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    Please explain what am i doing wrong, and explain to someone who almost has no experience with ubuntu. I am new to this.

    Thank you

  2. #2
    Join Date
    Jan 2010
    Location
    Australia
    Beans
    544
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket

    Running "mysql reset-password" is not the same as running "/etc/init.d/mysql reset-password".

    As it turns out, that tutorial appears to be outdated so it won't work anyway. Try searching Google for "mysqladmin reset root password".

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •