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'...
OK
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

done


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
empty:

 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?
-- 
Regards,
Mick

Reply via email to