Results 1 to 3 of 3

Thread: I can't seem to connect to mysql

  1. #1
    Join Date
    Jun 2008
    Location
    Chicago
    Beans
    202
    Distro
    Ubuntu 14.04 Trusty Tahr

    I can't seem to connect to mysql

    I'm using ubuntu 10.04 LTS I install mysql

    Code:
    sudo apt-get install mysql-server
    I set up my password and confirm

    I type mysql at the terminal and i get this back.

    Code:
     gorda@Fertech-Mendoza:~$ mysql
    Warning: World-writable config file '/etc/mysql/my.cnf' is ignored
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    gorda@Fertech-Mendoza:~$
    how can I correct this issue.

  2. #2
    Join Date
    Jun 2011
    Location
    London, UK
    Beans
    70
    Distro
    Ubuntu

    Re: I can't seem to connect to mysql

    The first line is a permissions error. MySQL is complaining its config file is too open - fix it with

    Code:
    sudo chmod 0644 /etc/mysql/my.cnf
    Next I'd give mysql a restart - sometimes the second error is caused by the service not actually running, or as a result of the first error:

    Code:
    sudo service mysql restart
    If you get a message about mysql not currently running, replace 'restart' with 'start' in the command above, then try connecting with

    Code:
    mysql -u root -p

  3. #3
    Join Date
    Nov 2011
    Beans
    1

    Re: I can't seem to connect to mysql

    Thanks a lot, it solves my problem.

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
  •