MySQL Duplicate Database

I want to copy (all data, schema, procedures, etc.) from database1 to database2 that are located on the same server. I've tried using mysqldump, but every time I get

ERROR 1227 (42000) on line 18: Access denied; you need (at least one of) SUPER privileges for this operation

This is because my root user, which I am using for this operation, does not have the SUPER privilege and I do not have access to this change.

Is there a solution to do this without using mysqldump?

Keep in mind that this is a fairly large database with over a hundred tables.

+3


source to share


1 answer


You must grant privileges to the user:

GRANT ALL PRIVILEGES ON database_name.* TO 'username'@'yourhost';

      



if you want to do this for all databases:

GRANT SELECT ON *.* TO 'username'@'yourhost';
FLUSH PRIVILEGES;

      

+2


source







All Articles