Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Mysql issue

  1. #1

    Default Mysql issue

    I installed MySql via Yast in 10.3. After I start up the machine mysql isn't running and when I try to start it I get this error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

    If I reinstall MySQL and set up the root password it works until I log back in.

    I don't really need it running every time I start my machine. How do I manually start it and if I want force it to run on boot? The Mysql entry on this site assumes that by installing through yast and setting the password means that all is well so there is no other information.

  2. #2
    Join Date
    Jun 2008
    Location
    Finland, European Union
    Posts
    1,879

    Default Re: Mysql issue

    chkconfig mysql on
    Starts it upon every reboot.

    rcmysql start
    Starts MySQL.

    Both must be issued as either root or with super user privileges.

  3. #3

    Default Re: Mysql issue

    Thanks but neither of those worked. I found the solution: /sbin/service mysql start

  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Mysql issue

    Probably didn't work because you didn't have /sbin and /usr/sbin on your $PATH. su by itself won't change $PATH, but if you do su -, you will get root's $PATH and chrysantine's suggestions will work. Or specify the absolute path:

    /sbin/chkconfig
    /usr/sbin/rcmysql

  5. #5
    Join Date
    Jun 2008
    Location
    Mumbai,India
    Posts
    43

    Default Re: Mysql issue

    /etc/init.d/mysql start
    works fine for me.. i start as when I need..

  6. #6
    Join Date
    Jun 2008
    Location
    Finland, European Union
    Posts
    1,879

    Default Re: Mysql issue

    Quote Originally Posted by vilanye View Post
    Thanks but neither of those worked. I found the solution: /sbin/service mysql start
    If they didn't work, you weren't root.

  7. #7
    Join Date
    Jun 2008
    Location
    West Yorkshire, UK
    Posts
    3,454

    Default Re: Mysql issue

    Use Yast to go into System Services and check mysql and apache and everything will be OK.

    You shouldn't try to run mysql from the Linux root at all as Apache is up and running and you will be vulnerable, only from user.

  8. #8
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Mysql issue

    Quote Originally Posted by john_hudson View Post
    Use Yast to go into System Services and check mysql and apache and everything will be OK.

    You shouldn't try to run mysql from the Linux root at all as Apache is up and running and you will be vulnerable, only from user.
    If you are worried about accidents while root, use sudo:

    Code:
    sudo /usr/sbin/rcmysql start
    or

    Code:
    sudo /etc/init.d/mysql start
    which is portable across Linuxes.

    Much faster than firing up YaST and works over a terminal connection.

  9. #9
    Join Date
    Jun 2008
    Location
    Finland, European Union
    Posts
    1,879

    Default Re: Mysql issue

    Quote Originally Posted by john_hudson View Post
    You shouldn't try to run mysql from the Linux root at all as Apache is up and running and you will be vulnerable, only from user.
    The init scripts switch user privileges - that's why you're supposed to use them ;-)

  10. #10

    Default Re: Mysql issue

    Quote Originally Posted by Chrysantine View Post
    If they didn't work, you weren't root.
    I was root and they didn't work.not with su or with sudo. sudo doesn't run many root programs, ifconfig and iwconfig to name two.

    su - did work

    We have learned today that su or sudo won't run everything. Apparently su - will.

    I don't use Apache so no worries there. I only use MySQL to test a few rails apps running in mongrel.

    Why in the heck are the mysql files scattered all over the file system and there are so many ways to start it? That is not indicative of good design. Mysql isn't the only offender. The number of places that **** for java is scattered around is even worse.

Page 1 of 2 12 LastLast

Posting Permissions

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