Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: MySql won't start. Socket problem maybe?

  1. #1
    prijic87 NNTP User

    Default MySql won't start. Socket problem maybe?


    Hi guys. I recently posted a question about phpMyAdmin, that it won't
    connect to the mysql database. I thought that the problem is in the
    phpMyAdmin not in the mysql. But now i think different. It seems that
    the problem is right in the mysql. I think that there was no root user,
    when mysql was freshly installed. Unfortunately i did everything i can
    find on internet (some tutorials) but they don`t helped me at all, maybe
    i fu**ed up the mysql service. So i reinstalled it, and when i want to
    start it there is no file mysql.sock and i get the following:

    linux-nepg:~ # service mysql restart
    Restarting service MySQL
    Shutting down service MySQL
    done
    Starting service MySQL warning: /var/lib/mysql/mysql.sock didn't appear
    within 30 seconds

    I thought that this file should be recreated after the mysql was
    reinstalled, but unfortunately not.
    Help me i am frustrated, for 3 hours i am trying to solve this
    problem,and without any success. Please answer, and give some hints or
    ideas. Thank you!


    --
    prijic87
    ------------------------------------------------------------------------
    prijic87's Profile: http://forums.opensuse.org/member.php?userid=21439
    View this thread: http://forums.opensuse.org/showthread.php?t=407054


  2. #2
    ken yap NNTP User

    Default Re: MySql won't start. Socket problem maybe?


    Check the ownership of /var/lib/mysql and everything in it.

    Sometimes people try to run the mysqld process directly. This causes
    some files to be owned by root and then when they try to start it from
    the init script, as they should, something doesn't work.

    If you have nothing in the DB, you might consider deleting
    /var/lib/mysql manually and reinstalling the package, to clear the
    error. A reinstall or upgrade doesn't delete the DB directory for
    obvious reasons.


    --
    ken_yap
    ------------------------------------------------------------------------
    ken_yap's Profile: http://forums.opensuse.org/member.php?userid=221
    View this thread: http://forums.opensuse.org/showthread.php?t=407054


  3. #3
    prijic87 NNTP User

    Default Re: MySql won't start. Socket problem maybe?


    I reinstalled the mysql, and now i can power it up. But there is still
    no root user, i don`t know why. I installed it via YaSt, and when i try
    to login i get this:

    mysql -u root
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 15
    Server version: 5.0.67 SUSE MySQL RPM

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> use mysql;
    ERROR 1044 (42000): Access denied for user ''@'localhost' to database
    'mysql'
    mysql>

    PhpMyAdmin can`t access the database with root username, but with any
    other can access the databases (default ones) but don`t have privileges
    to create a new database.

    Is there a file where i can add root user, or add a password to the
    root user?
    Thank you


    --
    prijic87
    ------------------------------------------------------------------------
    prijic87's Profile: http://forums.opensuse.org/member.php?userid=21439
    View this thread: http://forums.opensuse.org/showthread.php?t=407054


  4. #4
    ken yap NNTP User

    Default Re: MySql won't start. Socket problem maybe?


    To set a password for the mysql root user, do (from a root shell):


    Code:
    --------------------
    mysqladmin password 'thepassword'
    --------------------


    Then you can login to mysql as root by:


    Code:
    --------------------
    mysql -u root -p
    --------------------


    and it will prompt you for the password.


    --
    ken_yap
    ------------------------------------------------------------------------
    ken_yap's Profile: http://forums.opensuse.org/member.php?userid=221
    View this thread: http://forums.opensuse.org/showthread.php?t=407054


  5. #5
    prijic87 NNTP User

    Default Re: MySql won't start. Socket problem maybe?


    I already tried that. This is what i got:

    linux-nepg:~ # mysqladmin password admin
    mysqladmin: Can't turn off logging; error: 'Access denied; you need the
    SUPER privilege for this operation'


    --
    prijic87
    ------------------------------------------------------------------------
    prijic87's Profile: http://forums.opensuse.org/member.php?userid=21439
    View this thread: http://forums.opensuse.org/showthread.php?t=407054


  6. #6
    ken yap NNTP User

    Default Re: MySql won't start. Socket problem maybe?


    Bizarre. Have you checked the ownership of /var/lib/mysql like I said?


    --
    ken_yap
    ------------------------------------------------------------------------
    ken_yap's Profile: http://forums.opensuse.org/member.php?userid=221
    View this thread: http://forums.opensuse.org/showthread.php?t=407054


  7. #7
    prijic87 NNTP User

    Default Re: MySql won't start. Socket problem maybe?


    Yes i found that. The owner is mysql.

    User:mysql
    Group: mysql

    Is that fine?


    --
    prijic87
    ------------------------------------------------------------------------
    prijic87's Profile: http://forums.opensuse.org/member.php?userid=21439
    View this thread: http://forums.opensuse.org/showthread.php?t=407054


  8. #8
    ken yap NNTP User

    Default Re: MySql won't start. Socket problem maybe?


    Yes, that's correct. Also all the files in it should be owned by
    mysql:mysql.

    Coming back to your problem, it seems that mysqladmin could not connect
    to the socket to change anything. So the problem is probably earlier
    when mysqld could not create the socket.

    Do you have an old /etc/my.cnf perhaps, or from some other distro, that
    specifies a different place for the socket? If you do, delete it and
    reinstall the package to get a correct copy.


    --
    ken_yap
    ------------------------------------------------------------------------
    ken_yap's Profile: http://forums.opensuse.org/member.php?userid=221
    View this thread: http://forums.opensuse.org/showthread.php?t=407054


  9. #9
    prijic87 NNTP User

    Default Re: MySql won't start. Socket problem maybe?


    Hmm... every file inside mysql dir has the same parameters as i said
    above. Today i installed 11.1 until then i had 9.0 suse also with mysql
    installed. In etc there is only one binary file my.cnf. How to check if
    there is old copy of it from 9.0?


    --
    prijic87
    ------------------------------------------------------------------------
    prijic87's Profile: http://forums.opensuse.org/member.php?userid=21439
    View this thread: http://forums.opensuse.org/showthread.php?t=407054


  10. #10
    ken yap NNTP User

    Default Re: MySql won't start. Socket problem maybe?


    You can check if /etc/my.cnf (which is a text file by the way, and can
    be viewed with a text editor, a binary file would definitely cause mysql
    to cough and splutter) is the same as from the package with:


    Code:
    --------------------
    rpm -V mysql
    --------------------


    If it reports that the file is changed, there are two possibilities:
    The file came from somewhere else, or you edited it. Either way it's not
    good if this is supposed to be a fresh install.

    If you find that the file is not the one from the package, then delete
    it and reinstall mysql to get the correct version.


    --
    ken_yap
    ------------------------------------------------------------------------
    ken_yap's Profile: http://forums.opensuse.org/member.php?userid=221
    View this thread: http://forums.opensuse.org/showthread.php?t=407054


Page 1 of 3 123 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
  •