cancel
Showing results for 
Search instead for 
Did you mean: 

DB Rollback error command line

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

DB Rollback error command line

Hi,

I am new in Magento 2. I install the extension and take a backup after installing I am getting the issue and I think to make the rollback for code, DB, media.

 

Code and media rollback did successfully but the DB rollback fails with this error "Multiple queries can't be executed. Run a single query and try again."

 

http://prntscr.com/phru8s

 

The command I am writing is php bin/magento setup:rollback -d 1570163309_db.sql

 

Can anyone help me on this as my website is not working anymore and it's urgent for me to fix it.

 

Thanks & regards,
Villiam

6 REPLIES 6

Re: DB Rollback error command line

Hi @villiamjitweo 

 

Not sure, but you can try multi=True for enable multiple queries:

php bin/magento setup:rollback -d 1570163309_db.sql --multi=True

Please confirm if it will work for you.

 

Thanks

Re: DB Rollback error command line

Have the same error

--multi=True not help

Re: DB Rollback error command line

Have the same error

--multi=True not help


@shusha wrote:

Have the same error

--multi=True not help


 

Re: DB Rollback error command line

cat var/backups/backupfilename_db.sql | mysql -u mysqluser-p -D magentoDbName

-----------------

if mysql error

ERROR 1044 (42000): Access denied for user 'mysqluser'@'%' to database 'magentoDbName'

 

GRANT ALL ON magentoDbName.* TO 'mysqluser'@'localhost' IDENTIFIED BY 'mysqlpassword';

-----------------

go back to front page if it's error

There has been an error processing your request

 

You required to run below command in sequence - open your SSH command line terminal and run below commands :

 

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:clean
php bin/magento cache:flush

Re: DB Rollback error command line

I get the same error too but can't find online any answers. Has anyone found a cause of the error? I want to be able to run the "bin/magento setup:rollback" command and not through SSH using mysql commands

Re: DB Rollback error command line

i got the same problem