MySQL Notes

23 days ago

Time needed: 5 minutes.

How-to MySQL

  1. How to backup MySQL database

    # Backup database named “swsdb” and write to file: swsdb.sql
    mysqldump –routines -u root -p swsdb > swsdb.sql

  2. How to restore MySQL database

    # Restore database named “swsdb” from dump: swsdb.sql
    mysql -u root -p swsdb < swsdb.sql

  3. References

    https://ubuntu.com/server/docs/databases-mysql