PDA

View Full Version : Can't execute the given command because you have active locked tables or an active tr



massoo
April 4th, 2008, 08:09 AM
Hi,

I am trying to implement ZRM for MySQL. however if I run

# mysql-zrm-scheduler --now --backup-set dailyrun
I get

/usr/local/mysql/bin/mysqldump: /usr/local/mysql/bin/mysqldump: Couldn't execute 'SHOW CREATE DATABASE IF NOT EXISTS `india_bangalore`': Can't execute the given command because you have active locked tables or an active transaction (1192)

/usr/local/mysql/bin/mysqldump: /usr/local/mysql/bin/mysqldump: Couldn't execute 'SHOW CREATE DATABASE IF NOT EXISTS `india_chennai`': Can't execute the given command because you have active locked tables or an active transaction (1192)
/usr/local/mysql/bin/mysqldump: Got error: 1049: Unknown database 'pune' when selecting the database
dailyrun:backup:ERROR: mysqldump command did not succeed.

Command used is "/usr/local/mysql/bin"/mysqldump --opt --extended-insert --single-transaction --create-options --default-character-set=utf8 --user="mtrakbackup" --password="*****" --databases satrang india_bangalore india_chennai pune UKMap dell_bangalore gcc greece jakarta kenya livehelp navtequae new_kenya_map oman sum_jawav2 sum_jawav2_split thailand > "/var/lib/mysql-zrm/dailyrun/20080404202247/backup.sql"dailyrun:backup:INFO: backup-status=Backup failed
dailyrun:backup:INFO: Backup failed

What am I doing wrong. How o overcome this lock issues ?

regards
Prashant

zmanda_jacob
April 4th, 2008, 08:58 AM
Please make sure that the backup user you are specifying in your backup set to back up the database has the following permissions in the MySQL server:

mysql -u root -p'root-password' -l localhost
mysql> GRANT LOCK TABLES, SELECT, FILE, CREATE, DROP, INDEX, SHUTDOWN, ALTER, INSERT, SUPER, RELOAD ON *.* TO 'backup-user'@'localhost' IDENTIFIED BY 'backup-user-password';

Then please try your backup again.

massoo
April 7th, 2008, 09:34 PM
Hi,
I tried.... but same results

zmanda_jacob
April 8th, 2008, 09:30 AM
Please add the line:

verbose="1"

To the end of /etc/mysql-zrm/dailyrun/mysql-zrm.conf and then run another backup test without "pune" in the list. Afterwards, please post the contents of /etc/mysql-zrm/mysql-zrm.conf and /etc/mysql-zrm/dailyrun/mysql-zrm.conf, but be careful to exclude the lines that contain the database password. Also, please attach the /var/log/mysql-zrm/mysql-zrm.log as it will contain debugging information we can use to troubleshoot the problem.

paddy
April 8th, 2008, 09:49 AM
Hi,

I am trying to implement ZRM for MySQL. however if I run

I get


What am I doing wrong. How o overcome this lock issues ?

regards
Prashant

Which version of MySQL client are you using on ZRM server? Run "mysql --version"

We have tested only with MySQL client version 4.0.24 or later.

There is a MySQL bug reported with similar symptoms (http://bugs.mysql.com/bug.php?id=8071). The solution appears to be upgrade to 4.0.24.

Paddy

massoo
April 9th, 2008, 04:25 AM
i use mysql 4.1.8-max version. However ZRM works fine in another server and just fails to backup the db's in this server. All the settings are same in both the servers including hardware, Linux & mysql version, etc.

paddy
April 9th, 2008, 09:50 AM
Please check mysql client version on the ZRM server.

Paddy