Linux Archive

Linux Archive (
-   Gentoo User (
-   -   mysql_upgrade access rights (

Mick 05-11-2012 11:20 PM

mysql_upgrade access rights
After I update mysql I usually run:

$ mysqlcheck --all-databases --check-upgrade -u root -p

and it completes fine.

However, if I try 'mysql_upgrade -u root --password=XXXXXX' it fails
at the end like so:

$ mysql_upgrade -v -h localhost -u root --password=XXXXXX
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck' with connection arguments: '--port=3306'
'--socket=/var/run/mysqld/mysqld.sock' '--host=localhost'
Running 'mysqlcheck' with connection arguments: '--port=3306'
'--socket=/var/run/mysqld/mysqld.sock' '--host=localhost'
Krecipes.author_list OK
Krecipes.authors OK
Krecipes.categories OK
Krecipes.category_list OK
Krecipes.db_info OK
Krecipes.ingredient_groups OK
[snip ....]

Running 'mysql_fix_privilege_tables'...
Could not create the upgrade info file
'/var/lib/mysql/mysql_upgrade_info' in the MySQL Servers datadir,
errno: 13

The strange thing is that running the mysql_fix_privilege_tables
command by hand succeeds!

$ mysql_fix_privilege_tables -v -u root --password=XXXXXX
This script updates all the mysql privilege tables to be usable by
the current version of MySQL


I'm not sure I understand why this happens. I even created the file
/var/lib/mysql/mysql_upgrade_info by hand and chowned it to
mysql:mysql, but still comes up with the same error. The file stays

ls -la /var/lib/mysql/mysql_upgrade_info
-rw-rw---- 1 mysql mysql 0 May 12 01:03 /var/lib/mysql/mysql_upgrade_info

Any ideas?

All times are GMT. The time now is 10:35 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.