Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: Gentoo-User <gentoo-user@l.g.o>
Subject: [gentoo-user] mysql_upgrade access rights
Date: Fri, 11 May 2012 23:23:28
Message-Id: CAGOe-exnEBYjm+zVQLxiC5TZjfz9f2w2GHjdutOaSGhC9k7ifg@mail.gmail.com
1 After I update mysql I usually run:
2
3 $ mysqlcheck --all-databases --check-upgrade -u root -p
4
5 and it completes fine.
6
7
8 However, if I try 'mysql_upgrade -u root --password=XXXXXX' it fails
9 at the end like so:
10
11 $ mysql_upgrade -v -h localhost -u root --password=XXXXXX
12 Looking for 'mysql' as: mysql
13 Looking for 'mysqlcheck' as: mysqlcheck
14 Running 'mysqlcheck' with connection arguments: '--port=3306'
15 '--socket=/var/run/mysqld/mysqld.sock' '--host=localhost'
16 Running 'mysqlcheck' with connection arguments: '--port=3306'
17 '--socket=/var/run/mysqld/mysqld.sock' '--host=localhost'
18 Krecipes.author_list OK
19 Krecipes.authors OK
20 Krecipes.categories OK
21 Krecipes.category_list OK
22 Krecipes.db_info OK
23 Krecipes.ingredient_groups OK
24 [snip ....]
25
26 Running 'mysql_fix_privilege_tables'...
27 OK
28 Could not create the upgrade info file
29 '/var/lib/mysql/mysql_upgrade_info' in the MySQL Servers datadir,
30 errno: 13
31
32
33 The strange thing is that running the mysql_fix_privilege_tables
34 command by hand succeeds!
35
36 $ mysql_fix_privilege_tables -v -u root --password=XXXXXX
37 This script updates all the mysql privilege tables to be usable by
38 the current version of MySQL
39
40 done
41
42
43 I'm not sure I understand why this happens. I even created the file
44 /var/lib/mysql/mysql_upgrade_info by hand and chowned it to
45 mysql:mysql, but still comes up with the same error. The file stays
46 empty:
47
48 ls -la /var/lib/mysql/mysql_upgrade_info
49 -rw-rw---- 1 mysql mysql 0 May 12 01:03 /var/lib/mysql/mysql_upgrade_info
50
51 Any ideas?
52 --
53 Regards,
54 Mick