Results 1 to 5 of 5

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

  1. #1
    Join Date
    May 2010
    Location
    Lahore Pakistan
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Thumbs down MySQL ERROR 2002 (HY000): Can't connect to local

    guys i try to install apache php mysql and phpmyadmin through this article.
    http://www.howtoforge.com/ubuntu_lamp_for_newbies
    install apache2 ------ successfully
    install php --------- successfully
    But when i try to install mysql and phpmyadmin then this error occure.

    Screenshot.png

    And while removing this.

    sudo apt-get purge apache2 php5 libapache2-mod-php5 mysql-server libapache2-mod-auth-mysql php5-mysql phpmyadmin

    i got this error.

    Code:
    Setting up phpmyadmin (4:3.3.2-1) ...
    dbconfig-common: writing config to /etc/dbconfig-common/phpmyadmin.conf
    Replacing config file /etc/phpmyadmin/config-db.php with new version
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2).
    unable to connect to mysql server.
    error encountered creating user:
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    dbconfig-common: phpmyadmin configure: ignoring errors from here forwards
    populating database via sql...  done.
    dbconfig-common: flushing administrative password
    
    adeee@adeee:~$
    How can i install apache mysql phpmyadmin and php fine?

    Remeber while testing php run fine but phpmyadmin run not fine.

  2. #2
    Join Date
    Feb 2011
    Location
    United States
    Beans
    9
    Distro
    Ubuntu 10.10 Maverick Meerkat

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

    Try removing all those that you have installed already.

    Then go to your terminal and type
    Code:
    sudo apt-get install php5 mysql-server apache2 phpmyadmin
    and hit enter.

  3. #3
    Join Date
    May 2010
    Location
    Lahore Pakistan
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

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

    Guys now i try to remove PHP5, apache2, and mysql

    and then try again to install via this site. https://help.ubuntu.com/community/ApacheMySQLPHP

    Now apache not work.
    This is the installing procces


    Code:
    Setting up apache2-mpm-prefork (2.2.14-5ubuntu8.4) ...
     * Starting web server apache2
    apache2: Syntax error on line 233 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/conf.d/phpmyadmin.conf: No such file or directory                                           [fail]
    invoke-rc.d: initscript apache2, action "start" failed.
    
    Setting up dbconfig-common (1.8.44ubuntu1) ...
    
    Setting up wwwconfig-common (0.2.1) ...
    Setting up javascript-common (7) ...
    
    Setting up php5-common (5.3.2-1ubuntu4.7) ...
    Setting up libapache2-mod-php5 (5.3.2-1ubuntu4.7) ...
    Your apache2 configuration is broken, so we're not restarting it for you.
    
    Setting up mysql-common (5.1.41-3ubuntu12.9) ...
    Setting up libmysqlclient16 (5.1.41-3ubuntu12.9) ...
    
    Setting up libnet-daemon-perl (0.43-1) ...
    Setting up libplrpc-perl (0.2020-2) ...
    Setting up libdbi-perl (1.609-1build1) ...
    Setting up libdbd-mysql-perl (4.012-1ubuntu1) ...
    Setting up libjs-mootools (1.2.4.0~debian1-1) ...
    Setting up libmcrypt4 (2.5.8-3.1) ...
    
    Setting up libt1-5 (5.1.2-3build1) ...
    
    Setting up mysql-client-core-5.1 (5.1.41-3ubuntu12.9) ...
    Setting up mysql-client-5.1 (5.1.41-3ubuntu12.9) ...
    Setting up mysql-client (5.1.41-3ubuntu12.9) ...
    Setting up php5-gd (5.3.2-1ubuntu4.7) ...
    Setting up php5-mcrypt (5.3.2-0ubuntu1) ...
    Setting up php5-mysql (5.3.2-1ubuntu4.7) ...
    Setting up phpmyadmin (4:3.3.2-1) ...
    dbconfig-common: writing config to /etc/dbconfig-common/phpmyadmin.conf
    
    Creating config file /etc/dbconfig-common/phpmyadmin.conf with new version
    
    Creating config file /etc/phpmyadmin/config-db.php with new version
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2).
    unable to connect to mysql server.
    error encountered creating user:
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    dbconfig-common: phpmyadmin configure: aborted.
    dbconfig-common: flushing administrative password
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2).
    unable to connect to mysql server.
    error encountered creating database:
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    dbconfig-common: phpmyadmin configure: aborted.
    dbconfig-common: flushing administrative password
    populating database via sql...  error encountered populating database:
    mysql said: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    dbconfig-common: phpmyadmin configure: aborted.
    dbconfig-common: flushing administrative password
    done.
    dbconfig-common: flushing administrative password
    
    Processing triggers for libc-bin ...
    ldconfig deferred processing now taking place
    and upper i mention the error in picture are occurs.
    so how i install lampp server properly?
    can i need to install ubuntu again?

  4. #4
    Join Date
    May 2010
    Location
    Lahore Pakistan
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

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

    reply please.

  5. #5
    Join Date
    Mar 2005
    Beans
    96

    Thank you!

    DegreesCelsius <- you made my day. Thank you!


    Quote Originally Posted by DegreesCelsius View Post
    Try removing all those that you have installed already.

    Then go to your terminal and type
    Code:
    sudo apt-get install php5 mysql-server apache2 phpmyadmin
    and hit enter.
    Thanks for that. It solved my problem. I forgot to install mysql-server because i thought mysql-common would come with it. My mistake.

    After installing mysql-server with

    Code:
    sudo apt-get install mysql-server
    i could reconfigure php-myadmin

    Code:
    dpkg-reconfigure phpmyadmin
    flawless.

    /lprofil

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
  •