Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2003
    Posts
    110

    mysql, need to reset root pass

    I forgot my root pass for mysql. I have a dedicated Linux server with CI HOST. I work with mysql alot on Win32 systems and know how to reset the password by shutting down the server and starting it up with --skip-grant-tables, however, i am having problems doing the same on the linux box.

    the only way i can shut mysql down properly is to do

    # service mysqld stop
    then start it back up by doing

    # safe_mysqld --skip-grant-tables &
    which results in the following:

    touch: creating `/usr/local/mysql/var/dunndeal.propagation.net.err': No such file or directory
    chown: getting attributes of `/usr/local/mysql/var/dunndeal.propagation.net.err': No such file or directory
    Starting mysqld daemon with databases from /usr/local/mysql/var
    /usr/local/mysql/bin/safe_mysqld: /usr/local/mysql/var/dunndeal.propagation.net.err: No such file or directory
    /usr/local/mysql/bin/safe_mysqld: /usr/local/mysql/var/dunndeal.propagation.net.err: No such file or directory
    tee: /usr/local/mysql/var/dunndeal.propagation.net.err: No such file or directory
    040401 09:40:05 mysqld ended
    tee: /usr/local/mysql/var/dunndeal.propagation.net.err: No such file or directory
    I tried following the documentation on mysql.com for bringing down the mysql server and resetting the password but that doesnt work.

    I am going to cry....

    Help a *nix n00b?

  2. #2
    Join Date
    Jun 2003
    Posts
    673
    It sounds like you might have two copies of mysql installed on your server. Try "/usr/bin/safe_mysqld --skip-grant-tables &".

  3. #3
    Join Date
    Mar 2003
    Posts
    110
    Yes, there was a previous version of mysql. I upgraded. I still get the same problem though. Here is the issue in exact detail.


    I downloading the mysql-4.0.18-pc-linux-i686.tar.gz
    I unpacked it to /home/mysql-4.0.18-pc-linux-i686.tar.gz
    coppied old /data dir to new mysql install location
    Set file/dir permissions
    Created symbolic link 'mysql' in /usr/local
    Then i ran mysqld_safe --user=mysql --skip-grant-tables

    I got this back the first try


    [2] 5003
    [1] Exit 127 /bin/mysqld_safe --user=mysql --skip-grant-tables
    [root@dunndeal mysql]# Starting mysqld daemon with databases from /usr/local/mysql/data
    040401 13:09:08 mysqld ended

    Then i tested the install by doing

    mysqladmin version

    I got this

    mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
    Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!

    Same old crap and i dont know how to fix it.

Posting Permissions

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