Monday, March 03, 2003

CodeBit; How do I Reset the Root password of MySQL Using Linux?

  1. /usr/local/mysql/bin/safe_mysqld --skip-grant-tables &
  2. /usr/local/mysql
  3. use mysql;
  4. update user set password = password('.......') where user = 'root' and host='localhost';
  5. Stop and Start the MySQL server. [2003Oct03 Note] A reader mentioned that it is easier to 'flush privileges' instead of restarting the server.
Post a Comment