Taking dump of all tables of a Database. For Example - DB name is development_studio
C:\>mysqldump --single-transaction -u sanjeev -p development_Studio > dump.sql
Enter password: *******
--single-transaction option is above command make sure that taking dump does not give TABLE LOCK error. For example
>mysqldump -u sanjeev -p development_Studio > dump.sql
Enter password: *******
mysqldump: Got error: 1044: Access denied for user 'sanjeev'@'localhost' to database 'development_studio' when using LOCK TABLES
Another option is to grant LOCK TABLES to your user:
c:\>
mysql -u root -p
mysql> GRANT SELECT,LOCK TABLES ON DBNAME.* TO 'username'@'localhost';
No comments:
Post a Comment