After upgrade to mysql5, cpbackups fail with error

nyjimbo

Well-Known Member
Jan 25, 2003
1,135
1
168
New York
We just noticed that after upgrading two freebsd 6.2 servers to mysql 5.0.84 (from 4.1.25) when we do a "pkgacct" or view logs from cpbackup we see lines like this:

Grabbing mysql privs...DBD::mysql::db do failed: Table 'mysql.procs_priv' doesn't exist at /usr/local/cpanel/Cpanel/Mysql.pm line 1074.

or

DBD::mysql::st execute failed: There is no such grant defined for user 'xxxxxxx_' on host '%' at /usr/local/cpanel/Cpanel/Mysql.pm line 370.
DBD::mysql::st fetchrow_arrayref failed: fetch() without execute() at /usr/local/cpanel/Cpanel/Mysql.pm line 371.


Anyone know what might have gone wrong ?

Servers are running cPanel 11.24.5-C37629 - WHM 11.24.2 - X 3.9
 
Last edited:

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
80
458
cPanel Access Level
Root Administrator
Grabbing mysql privs...DBD::mysql::db do failed: Table 'mysql.procs_priv' doesn't exist at /usr/local/cpanel/Cpanel/Mysql.pm line 1074.
Does that table exist in the mysql database?

[email protected] [~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3275
Server version: 5.0.84-community MySQL Community Edition (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> describe procs_priv;
+--------------+----------------------------------------+------+-----+-------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------+----------------------------------------+------+-----+-------------------+-------+
| Host | char(60) | NO | PRI | | |
| Db | char(64) | NO | PRI | | |
| User | char(16) | NO | PRI | | |
| Routine_name | char(64) | NO | PRI | | |
| Routine_type | enum('FUNCTION','PROCEDURE') | NO | PRI | NULL | |
| Grantor | char(77) | NO | MUL | | |
| Proc_priv | set('Execute','Alter Routine','Grant') | NO | | | |
| Timestamp | timestamp | NO | | CURRENT_TIMESTAMP | |
+--------------+----------------------------------------+------+-----+-------------------+-------+
8 rows in set (0.04 sec)
 

nyjimbo

Well-Known Member
Jan 25, 2003
1,135
1
168
New York
If I run it on either of the freebsd servers it shows the it does not exist:

xxxxxx# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 826926
Server version: 5.0.84 FreeBSD port: mysql-server-5.0.84

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> describe procs_priv;
ERROR 1146 (42S02): Table 'mysql.procs_priv' doesn't exist
mysql>
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
80
458
cPanel Access Level
Root Administrator
You might need to run one of the following:

/usr/local/bin/mysql_upgrade

/usr/local/bin/mysql_fix_privilege_tables
 

nyjimbo

Well-Known Member
Jan 25, 2003
1,135
1
168
New York
This looks familiar:

/usr/local/bin/mysql_fix_privilege_tables

I will run that and see if it fixes it. I could have sworn I did this before for some reason a long time ago, not sure why but might have been something similiar.

Thanks Kenneth !
 

nyjimbo

Well-Known Member
Jan 25, 2003
1,135
1
168
New York
Ok that seems to have fixed it. Thanks again.