Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mysqldump: Got error: 1449:

Tags:

mysql

windows

mysqldump: Got error: 1449: The user specified as a definer('root'@'192.200.1.16') does not exist when using LOCK TABLES

kindly give the solution on above error.

like image 846
Sharathkumar Vattikunta Avatar asked Oct 27 '14 07:10

Sharathkumar Vattikunta


People also ask

How do I change the definer of a trigger in MySQL?

Show activity on this post. 2) Open triggers. sql file in your favorite editor and use Find and Replace feature to change DEFINER s. Save updated file.

What is flush privileges in MySQL?

Flush privileges. mysql> FLUSH PRIVILEGES; when we grant some privileges for a user, running the command flush privileges will reloads the grant tables in the mysql database enabling the changes to take effect without reloading or restarting mysql service.

How do I drop a database in MySQL?

To do delete a database you need the command 'DROP DATABASE'. The syntax is similar to creating a database. 'DROP DATABASE <name>;', where <name> is the name of the database you want to delete.


1 Answers

Its better to use first mysqldump with --single-transaction, like:

mysqldump --single-transaction -u root -p mydb > mydb.sql 

If above not working try below one.

You have to replace the definer's for that procedures/methods, and then you can generate the dump without error.

You can do this like:

UPDATE `mysql`.`proc` p SET definer = 'root@localhost' WHERE definer='[email protected]' 

3rd party edit

For mysql 8.0 the table proc does no longer exist. Try

 SELECT * FROM information_schema.routines; 
like image 94
prashant thakre Avatar answered Oct 09 '22 04:10

prashant thakre