Problem With Backup

Hello! I need to provide functional for creating-restoring database backups in my application.

I took some extension which greate works on localhost but doesnt work on remote server.

Code of ext is really easy for understandig, it runinig throw database and puting into file DROP-CREATE-INSERT instructions for each table. Header and footer of this sql-file are:


SET AUTOCOMMIT=0;

START TRANSACTION;

SET SQL_QUOTE_SHOW_CREATE = 1;

SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;

SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; 


..............................

SQL

..............................


SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;

SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;

COMMIT;




For restoring ext read file with dump and execute it with yii::app()->db->CreateCommand(‘CodeFromSqlFile’)->execute().

Simple but it doesnt work on remote server! There are no any exceptions or errors in log files.

At the same time when im trying to execute sql-code from dump file in phpmyadmin(on remote DB) it running well.

May be someone will be able to help me? Tahnk you.