How to Change the MySQL password in SuSE Linux Enterprise Server 10 and 11
This document (7009745) is provided subject to the disclaimer at the end of this document.
SUSE Linux Enterprise Server 11 Service Pack 2
Steps to change the administrator password on SLES10 and 11:
1.) Ensure that mysqld and mysql aren't loaded
2.) Run the following command from the server to load mysql without reading in user accounts
mysqld_safe --skip-grant-tables &
3.) Hit Enter to return to the command prompt
4.) Launch the mysql console and load the mysql database
mysql --user=root mysql
5.) Change the password
UPDATE user SET Password=PASSWORD('newpassword') WHERE User='root';
NOTE: The word PASSWORD in the Password=PASSWORD('newpassword) line, is part of the command, change only the word newpassword to your new password.
6.) Test the change
mysql -u root -p
enter the new password when prompted....if it the mysql> prompt is displayed the change worked.
mysql -u root -p (then enter the password when prompted)
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7009745
- Creation Date: 15-Nov-2011
- Modified Date:03-Mar-2020
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com