H-Sphere Documentation Sysadmin Guide

For more information contact us at info@psoft.net

Changing MySQL Root Password

 

Related Docs:  

Restarting MySQL Server

This document explains how to change the root user password in MySQL access privilege database.

  1. Login as root to the box with the MySQL server.
  2. Stop MySQL server.
  3. Open the mysql server startup script. This is the file you have just executed to stop MySQL server.
  4. Find the line that contains teh safe_mysqld command and add --skip-grant-tables as its parameter.
  5. Start MySQL server.
  6. Login as the mysql user and connect to the mysql user/permission database:
    # su -l mysql
    # mysql -u root mysql
  7. Run the following two queries:
    mysql> UPDATE user SET Password=PASSWORD('newrootpassword') WHERE User='root';
    mysql> FLUSH PRIVILEGES;
    replacing newrootpassword with the new root password to the box with the MySQL server.
  8. Exit mysql database by typing /q.
  9. Exit mysql user console by typing exit
  10. Stop MySQL server.
  11. Open the mysql server startup script and remove the --skip-grant-tables parameter you added above.
  12. Start MySQL server.

Related Docs:  

Restarting MySQL Server



Home   Products   Services   Partners   Support   News   Contact   Forum
© Copyright 1998-2003. Positive Software Corporation.
All rights reserved.