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.