/
Pack Hosting Panel

MySQLdump command

How to make a MySQLdump on the Hipex platform?


In this article, we assume that you have configured the MySQL command the way we explained in the article ‘MySQL’ under “Command line”.

MySQLdump

When you want to make a MySQL dump in the normal way, you will get a similar error like this:

mysqldump: Error: 'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces

This is because the default MySQLdump contains information that cannot be imported to our platform, for example Create database & Alter database will not work with us.

Hipex MySQLdump command

To solve the problem above, you can use the Hipex MySQLdump command. Do not forget to add the right database_username and database_name in this command.

mysqldump --no-tablespaces --single-transaction --quick -u <database_username> -p <database_name> | LANG=C LC_CTYPE=C LC_ALL=C sed -e 's/DEFINER[ ]*=[ ]*[^*]*\*/\*/' | LANG=C LC_CTYPE=C LC_ALL=C sed -e 's/ROW_FORMAT=FIXED/ROW_FORMAT=DYNAMIC/' | LANG=C LC_CTYPE=C LC_ALL=C sed -e '/ROW_FORMAT/!s/^) ENGINE=InnoDB/) ENGINE=InnoDB ROW_FORMAT=DYNAMIC/' > database.sql

Importing MySQLdump

Then, you can import the just-created MySQLdump.

mysql -u <database_username> -p <database_name> < database.sql