MYSQL: Error Changing Root Password

This document (7009760) is provided subject to the disclaimer at the end of this document.


SUSE Linux Enterprise Server 10 Service Pack 1
SUSE Linux Enterprise Server 10 Service Pack 2
SUSE Linux Enterprise Server 10 Service Pack 3
SUSE Linux Enterprise Server 10 Service Pack 4
SUSE Linux Enterprise Server 11 Service Pack 1
SUSE Linux Enterprise Server 11 Service Pack 2


ERROR 1017 (HY000): Can't find file: './mysql/user.frm' (errno: 13) when attempting to run this command:
UPDATE user SET Password=PASSWORD('newpassword') WHERE User='root';
This command is used to change the root password on the default mysql database. The default file location for user.frm, mentioned above, is /var/lib/mysql/mysql, checking that location shows the file exists.


The likely cause of this problem is a rights / ownership problem.  If the mysql database was created manually by running the mysql_install_db command in the /usr/bin folder, it is liketly that the ownership will be:
root  root      1752 Nov 15 08:48 mysql
the ownership of the folder should be mysql for the owner and mysql for the qroup (instead of root and root).  To change the ownership, run this command:
chown mysql:mysql mysql
Now it should be possible to relaunch the mysql console and attempt to change the root users' password again.


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:7009760
  • Creation Date: 17-Nov-2011
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center