Page 5 of 5 FirstFirst ... 345
Results 41 to 50 of 50

Thread: MySQL ERROR 2002 (HY000): Can't connect to local...

  1. #41
    Join Date
    Nov 2009
    Beans
    27
    Distro
    Ubuntu

    Re: MySQL ERROR 2002 (HY000): Can't connect to local...

    Quote Originally Posted by ardnet View Post
    Hi All,

    I'm new Ubuntu user, and also having the same problem like this.
    And I've been read through all this post, and just wanna inform you guys that the conclusion is because..... the disk is full.

    Try to restart mysql and it will tell you the problem,
    by using this command: sudo /etc/init.d/mysql restart
    And after that, I got this message:
    * /etc/init.d/mysql: ERROR: The partition with /var/lib/mysql is too full!

    Then I removed any file that I think is useless to save up some space, then restart mysql again... Voila!!! Works for me

    Thanks
    Ha hahahah! For hours reading forums and this was the problem. How stupid I am!

  2. #42
    Join Date
    Apr 2011
    Beans
    1

    Re: MySQL ERROR 2002 (HY000): Can't connect to local...

    Hello guys,

    actually the problem could happened due to permissions also.

    I checked the owners of the directory "/var/run/mysqld" using

    #ls -lah

    and I got the following results:

    drwxr-xr-x 2 mysql root 40 2011-04-17 07:42

    so I changed the owners to be mysql user and mysql group, using:
    #chown mysql.mysql . -R

    then I restarted mysql and it worked fine for me.

  3. #43
    Join Date
    May 2010
    Beans
    16

    Smile Re: MySQL ERROR 2002 (HY000): Can't connect to local...

    same thing happened to me and i tried many things but it didn't work at last it worked after typing the following command:

    apt-get install mysql-server
    mysql_secure_installation
    mysql -u root -p



    you may chech the following link for details:
    http://library.linode.com/lamp-guide...tu-10.04-lucid

  4. #44
    Join Date
    Mar 2010
    Beans
    14

    Re: MySQL ERROR 2002 (HY000): Can't connect to local...

    Ok, I've gone through EVERY single suggestion and linked tutorial on this post, as well as numerous other posts I've Googled, and after all that, I still get:

    Code:
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
    Ack!!!!! I want to set up MythTV as a DVB tuner/recorder backend for XBMC, and it requires mysql-server. It gives me this error (as does anything else I try to do with mysql-server) and says "No UPnP". I am about to chuck my laptop out of my 2nd-story window!!!

  5. #45
    Join Date
    Oct 2011
    Beans
    1

    Re: MySQL ERROR 2002 (HY000): Can't connect to local...

    Hey. I was having a similar error when trying to access mysql at the command line. I look in the error.log (/var/log/mysql/error.log) and saw that I was having the following issue:
    Code:
    111027  6:20:29 [ERROR] Can't start server: Bind on TCP/IP port: Cannot assign requested address
    111027  6:20:29 [ERROR] Do you already have another mysqld server running on port: 3306 ?
    111027  6:20:29 [ERROR] Aborting
    I went into the my.cnf file (/etc/mysql/my.cnf) and found this line:
    Code:
    bind-address           = 192.168.1.121
    I'm not sure why it was bound to this IP address but it might have something to do with the configuration of my VM. I commented this line out and restarted mysql (service mysql start) and it works again.

    Hope that helps someone!

  6. #46
    Join Date
    May 2009
    Beans
    3

    Re: MySQL ERROR 2002 (HY000): Can't connect to local...

    Hi, i have the error
    SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) linux
    after upgrading ubuntu from 11.04 to 11.10

    The problem was caused by the apparmor daemon.

    I just changed the lines in /etc/apparmor.d/usr.sbin.mysqld

    - /var/run/mysqld/mysqld.pid w,
    - /var/run/mysqld/mysqld.sock w,

    to

    + /{,var/}run/mysqld/mysqld.pid w,
    + /{,var/}run/mysqld/mysqld.sock w,

    and restarted appamor daemnon with
    /etc/init.d/appamor restart

    After restarting mysql daemon everthing works fine
    /etc/init.d/mysql restart

    Perhapps it help you

  7. #47
    Join Date
    Nov 2011
    Beans
    1

    Re: MySQL ERROR 2002 (HY000): Can't connect to local...

    I had the same problem:

    Nov 23 17:54:45 server /etc/init.d/mysql[13117]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
    Nov 23 17:54:45 server /etc/init.d/mysql[13117]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

    Finally, I note that in the file /etc/mysql/my.cnf specified IP was wrong because I had changed the IP of the server host recently.

  8. #48
    Join Date
    Jul 2011
    Beans
    1

    Re: MySQL ERROR 2002 (HY000): Can't connect to local...

    Thank you so much walli!! After upgrading to 11.10 I had the same issue... Thankfully I found your post or I could have spent hours trying to figure it out.

  9. #49
    Join Date
    Apr 2012
    Beans
    1

    Re: MySQL ERROR 2002 (HY000): Can't connect to local...

    Hi to all! I also had such problem:
    Code:
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    The solution was to change the bind-adress to 127.0.0.1 in /etc/mysql/my.cnf

    Thanks to CriticalBandwidth for idea (#45)!
    Last edited by sidewinder01; April 15th, 2012 at 07:16 PM.

  10. #50
    Join Date
    Jan 2006
    Beans
    Hidden!
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: MySQL ERROR 2002 (HY000): Can't connect to local...

    too old to live.
    I am infallible, you should know that by now.
    "My favorite language is call STAR. It's extremely concise. It has exactly one verb '*', which does exactly what I want at the moment." --Larry Wall
    (02:15:31 PM) ***TimToady and snake oil go way back...
    42 lines of Perl - SHI - Home Site

Page 5 of 5 FirstFirst ... 345

Tags for this Thread

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
  •