Find the answer to your Linux question:
Results 1 to 8 of 8
i have installed this two rpm on redhat linux as 3 MySQL-client-4.0.18-0.i386.rpm MySQL-server-4.0.18-0.i386.rpm then ,i can see mysql in service , but when i : [root@localhost root]# mysql ERROR 2002: ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2005
    Posts
    2

    how to run mysqld


    i have installed this two rpm on redhat linux as 3
    MySQL-client-4.0.18-0.i386.rpm
    MySQL-server-4.0.18-0.i386.rpm

    then ,i can see mysql in service , but when i :
    [root@localhost root]# mysql
    ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

    [root@localhost root]# mysql -h 127.0.0.1
    ERROR 2003: Can't connect to MySQL server on '127.0.0.1' (111)

    [root@localhost bin]# mysqld
    Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
    051215 11:19:00 Aborting
    051215 11:19:00 mysqld: Shutdown Complete


    maybe i shouldnt start mysql as root , then i start mysql as user= mysql as follow:

    chown mysql.mysql -R /var/lib/mysql
    mysqld --user=mysql &

    051220 11:09:16 InnoDB: Started
    051220 11:09:16 Fatal error: Can't open privilege tables: File '/usr/share/mysql/charsets/?.conf' not found (Errcode: 2)
    051220 11:09:16 Aborting

    051220 11:09:16 InnoDB: Starting shutdown...
    051220 11:09:18 InnoDB: Shutdown completed
    051220 11:09:18 mysqld: Shutdown Complete

    what is the problem, any help is appreciated, thank you!
    Last edited by leann; 12-20-2005 at 02:31 AM.

  2. #2
    Linux Guru kkubasik's Avatar
    Join Date
    Mar 2004
    Location
    Lat: 39:03:51N Lon: 77:14:37W
    Posts
    2,396
    servers like mysql and apache are generaly not started from the command line like that, instead they tend to reside in the startup scripts and as such are started with the system, to do it manualy, it should be something like.

    /etc/init.d/mysqld start

    but that will differ from system to system.
    Avoid the Gates of Hell. Use Linux
    A Penny for your Thoughts

    Formerly Known as qub333

  3. #3
    Just Joined!
    Join Date
    Dec 2005
    Posts
    2
    thank you ! i follow your instruction,

    [root@localhost root]# cd /etc/rc.d/init.d

    [root@localhost init.d]# mysqld start
    Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
    051221 9:37:11 Aborting
    051221 9:37:11 mysqld: Shutdown Complete

    [root@localhost init.d]# mysql start
    ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

    [root@localhost init.d]# mysqld start --user=mysql &
    [1] 2667
    [root@localhost init.d]# 051221 9:43:36 InnoDB: Started
    051221 9:43:36 Fatal error: Can't open privilege tables: File '/usr/share/mysql/charsets/?.conf' not found (Errcode: 2)
    051221 9:43:36 Aborting
    051221 9:43:36 InnoDB: Starting shutdown...
    051221 9:43:38 InnoDB: Shutdown completed
    051221 9:43:38 mysqld: Shutdown Complete


    it is the same message, i dont know what to do.

  4. #4
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Buenos Aires, Argentina
    Posts
    908
    First do a "chown -R mysql.mysql /var/lib/mysql" and try to start mysql.
    serzsite.com.ar
    "All the drugs in this world won\'t save you from yourself"

  5. #5
    Just Joined!
    Join Date
    Jul 2005
    Location
    INDIA
    Posts
    41
    # serviec mysqld start

  6. #6
    Just Joined!
    Join Date
    Dec 2005
    Posts
    2
    Quote Originally Posted by devendra.meena
    # service mysqld start
    Thank you so much for this info!

    However, I set up mandriva to start mysql during boot-up but it still will not. How do I set it to start manually during boot time?

    Thanks

  7. #7
    Just Joined!
    Join Date
    Dec 2005
    Posts
    2
    Quote Originally Posted by PorkFat
    Thank you so much for this info!

    However, I set up mandriva to start mysql during boot-up but it still will not. How do I set it to start manually during boot time?

    Thanks
    According to these directions:

    http://www.howtoforge.com/perfect_se...ndriva_2006_p5

    I'm supposed to be able to run mysqld without having to type "service" first. Why would his work, do I have a newer version? I'd really like to have mine work the way it's supposed to and load up when I boot my system.

    *edit* Well, it booted and started mysql but I don't know how it changed. I guess starting it with the "service" line enabled it to come up during boot?

  8. #8
    Just Joined!
    Join Date
    Jun 2010
    Posts
    1
    /usr/local/mysql$ sudo ./bin/mysqld --user=root &
    This Works for me!

Posting Permissions

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