Skip to main content

Export (backup) and import mysql database on terminal

Following are the two methods:

Export (Backup)

$ mysqldump -u username -p database_to_backup --result-file backup_name.sql
with triggers and procedures
$ mysqldump -u username -p --routines database_to_backup --result-file backup_name.sql

This will store the sql file in the current directory.

Import

$ mysql -u username -p database_to_backup < backup_name.sql

This will store the sql file in the current directory.

Comments

  1. Your Blog is amazing...Thanks for sharing this helpful article..

    Technology
    payrollsolutionexperts

    ReplyDelete
  2. Quality content is the crucial to interest the people to pay a quick visit the web page, that’s what this website is providing.
    by cloudi5
    Web Design Company in Coimbatore

    ReplyDelete
  3. Cloudi5 is the web design company in coimbatore. Cloudi5 offering digital marketing, Search engine optimization, Social media marketing, Landing page optimization, website redesign, web design, website maintaining, web development, creative app creation, School management software OR School ERP software, Google ads, banner designing, etc,

    ReplyDelete
  4. Wow! Thank you! I constantly wanted to write on my site something like that. Can I take a portion of your post to my website? Best Mercury Outboard for Sale service provider.

    ReplyDelete
  5. school management software is a one-stop destination designed to digitize every operation of administration, management, teacher and faculty in the educational institute.

    ReplyDelete
  6. I located one reliable example of this fact through this blog website. I am mosting likely to use such information now. salesforce backup solution 

    ReplyDelete

Post a Comment

Popular posts from this blog

session_start(): Failed to initialize storage module: user (path: )

Error: session_start(): Failed to initialize storage module: user (path: ) Solution: When this error is given for the Codeigniter project you are running, that is specifically for not having a path recognised to store session data. Set config data as follows [file: your-project-folder/application/config/config.php] : $config['sess_driver'] = 'files'; $config['sess_cookie_name'] = 'ci_session'; $config['sess_expiration'] = 7200; $config['sess_save_path'] = APPPATH.'cache/'; $config['sess_match_ip'] = TRUE; $config['sess_time_to_update'] = 300; $config['sess_regenerate_destroy'] = FALSE;