MySQL Server password reset.

Discussion in 'Installation/Configuration' started by CJMostert, Aug 7, 2006.

  1. CJMostert

    CJMostert New Member

    I have tried EVERY THING!!! I followed the setup: but thought to provide a secure pass for my MYSQL SERVERand forgot that Linux uses special chrs (last did linux 7 years ago) so I messed it up. However only realised it when i tried to install ISPCongfig.

    I tried to follow the guid on resetting mysql from: but when I do step 4: mysqld_safe --init-file=~/mysql-init & It seems nothing happens... Ok some stuff do happen but I do not get my command prompt back!?

    I even tried uninstalling and re installing MYSQL but it seems to remember the SQL password.

    Please help!
  2. CJMostert

    CJMostert New Member

    More info

    O btw this is what my terminal show after the "mysqld_safe --init-file=~/mysql-init &" command:

    Starting mysqld daemon with databases from /var/lib/mysql
    STOPPING server from pid file /var/run/mysqld/
    060807 17:47:50 mysqld ended

    But then the terminal cursos just sit and blink on a blank line and nothing happens.

  3. themachine

    themachine ISPConfig Developer ISPConfig Developer


    I am not sure which distro you are using, but the following should work:

    add 'skip-grant-tables' to the MySQL server's 'my.cnf' usually found at '/etc/my.cnf. Needs to go under the '[mysqld]' section. Similar to:

    # Default to using old password format for compatibility with mysql 3.x
    # clients (those using the mysqlclient10 compatibility package).

    Then restart MySQL:

    /etc/init.d/mysql restart

    You should then be able to login to mysql without a password:

    linuxbox /]# mysql

    Now flush privileges (This clears privileges back to where they should be without 'skip-grant-tables')


    Then reset the root user's password:

    mysql> SET PASSWORD FOR 'root'@'localhost'=PASSWORD('password');

    Where 'password' is the cleartext password you want to set for root@localhost

    Now remove 'skip-grant-tables' from '/etc/my.cnf' and you are all set.
  4. falko

    falko Super Moderator ISPConfig Developer

  5. CJMostert

    CJMostert New Member

    Reinstallinf Fedora 5

    Hallo all
    It was much quicker to reinstall the Fedora 5... I did it in 3 or so hours thanx in any case:)

Share This Page