Find the answer to your Linux question:
Results 1 to 8 of 8
i've selected mysql when installing my new linux box,but i cant start it. At booting time it says "MySQL ended" When i try to restart it manually, it says "no ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Jan 2004
    Location
    Istanbul,Turkey
    Posts
    151

    MySQL Error


    i've selected mysql when installing my new linux box,but i cant start it.
    At booting time it says "MySQL ended"

    When i try to restart it manually, it says
    "no such file mysql.sock"
    or anythink like above

    Whats the problem?

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    What is the exact command that you use to restart it manually?

  3. #3
    Linux Newbie
    Join Date
    Jan 2004
    Location
    Istanbul,Turkey
    Posts
    151
    i read it from man page of mysql,it was smthing like that:
    Code:
    mysqld_safe &
    i cant remember exactly but it was in the man page.


    Dolda2000,i just noticed your post number, wow ,are you a bot or smthing

  4. #4
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    you need to specify a system user for mysql to run as, you should have created this (or it may have been done for you) during the install, depending on how you installed it.

    eg:
    Code:
    mysqld_safe --user=mysql &
    This user will need enough privilages to access your databases directory (location depends on install method).

    Jason

  5. #5
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    While it is as Jason says, I don't think missing that would a "no such file or directory" error. Check so that you actually have the MySQL directory (usually /var/lib/mysql).

  6. #6
    Just Joined!
    Join Date
    Jan 2004
    Posts
    14
    Im getting the same kind of thing:
    Code:
    root@f135210 bin]# safe_mysqld --user=mysql &
    [1] 3884
    [root@f135210 bin]# Starting mysqld daemon with databases from /var/lib/mysql
    040130 16:32:44  mysqld ended
    What can be the problem?

    /var/lib/mysql exists and is filled with the following
    Code:
    [root@f135210 root]# cd /var/lib/mysql
    [root@f135210 mysql]# ls
    mysql  mysql.sock  test
    when i try to start mysql:
    Code:
    [root@f135210 mysql]# mysql
    ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
    when i try to change root passwd:
    Code:
    bash-2.05b$ /usr/bin/mysqladmin -u root  password XXXXXXXXXX
    /usr/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)'
    Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!

  7. #7
    Linux User
    Join Date
    Nov 2002
    Posts
    420
    Just remember the basic mysql connection statement

    mysql_connect (hostname, username, password)

    This tell the script to connect to a mysql DBMS look for a computer called
    "hostname" and log in using the "username" and "password".

  8. #8
    Just Joined!
    Join Date
    Feb 2004
    Posts
    20
    Have you checked the messages in /var/lib/mysql/<localhost>.err ?

Posting Permissions

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