mysql_upgrade could not create the upgrade info file

nvomedia

Verified User
Joined
Aug 17, 2015
Messages
12
Hi,
I want to upgrade my MySQL from 5.0 to 5.5. With custombuild I tried to upgrade but that fails. After a whole weekend the mysql service will start again.
But MySQL is still not upgraded. I'm a beginner with Linux/CentOS so with Google I find some commands.

When I run ' mysql_upgrade -u da_admin -p'
-I get a lot of corrupted databases (I have tried to repair them with mysqlcheck, but they are still corrupt)
-And an error: Could not create the upgrade info file '/var/lib/mysql/mysql_upgrade_info' in the MySQL Servers datadir, errno: 21

After a few searches, it looks like a rights problem. da_admin does not have the rights to write in the /lib/mysql folder. The root user have that rights. But if I run mysql_upgrade with root user, I get an 'Acces Denied for root@localhost'.

What is the right way to fix this problem?
 
Hello,

da_admin does not have the rights to write in the /lib/mysql folder

da_admin is not a system user, it's MySQL user and it should not have any permissions to write to any directory on a server. It should not even exist at system level.

If the issue still persists please feel free to contact me for a private assistance.
 
Back
Top