You may use following commands for taking mysql dump in .sql format
cd /var/lib/mysql
ll | grep database
mysqldump database > database.sql
2. If the mysql dumps available and you want to restore that you need to use following commands
cd /var/lib/mysql
ll | grep database
mysql database < database.sql
Also you may use mysqlshow for search your databse
mysqlshow |grep database
***
You may do this using phpMyAdmin
- Login to Cpanel>>phpMyAdmin
- Click on your database name
- Click on the tab labeled EXPORT
- Select all tables you want to backup (usually all)
- Default settings usually work, just make sure SQL is checked
- Check the SAVE FILE AS box
- Hit GO
***
You may also do this using php
exec(“mysqldump database –user=databaseuser –password=dfs435ksja > my_dump.sql”);
Similar Posts:
- None Found