MySQL Tutorial – Physical vs. Logical Backups



MySQL Tutorial – Physical vs. Logical Backups

MySQL Tutorial - Physical vs. Logical Backups

In this short MySQL tutorial we’ll tell you the difference between MySQL logical backups and physical backups in MySQL.

Physical database backups backup copies of directories and files that store database contents.
To take a physical backup of the main storage engine of MySQL – InnoDB – perform a slow shutdown of the engine, back up all of the files related to it, and restore data.
To take a physical backup of MyISAM, lock all tables, then copy the .frm, .MYD, and .MYI files for every table on the MyISAM MySQL storage engine.

Logical MySQL backups, on the other hand, are taken while your database (any database – can be MySQL, MariaDB, Percona Server, or any other database) is still running. To take logical backups, employ mysqldump or SELECT INTO OUTFILE for bigger data sets.

Enjoy, tell about this tutorial to your friends, and until next time.

Below you can find a couple of sql interview questions and answers – make sure to glance through them before attending your next sql interview!

Q: How to protect against SQL injection?
A: Don’t pass user input into a SQL query. You really don’t need to pass a mysql advanced tutorial to know this – it’s that simple!

Q: What is the file to adjust mysql server configuration?
A: The mysql my.cnf file on Linux or the mysql my.ini file on Windows is what you should look into. If needed, we’ll make a separate mysql tutorial for beginners on how it works. A mysql tutorial covering which storage engine – myisam vs innodb – to choose is available here: https://youtube.com/shorts/MpVWcYsJqn4

Q: Is there a sql full course or any mysql tutorial that would cover mysql storage engines in more detail in all complex aspects?
A: Not that we know of, but if needed, we’ll make a sql course talking about everything: sql basics, sql queries, sql vs nosql, sql for data analysis, etc.

Q: Is there a big data tutorial for those looking to work with big data on mysql server?
A: Yes, it’s available here: https://youtube.com/shorts/GurccdgcjL0

Q: I’ve heard that MyISAM performs row level locking?
A: No, that’s a common misconception.

Q: MyISAM vs InnoDB performance – which one is better and why?
A: InnoDB – all of the features that were available in MyISAM are now available in InnoDB.

Q: What types of SQL indexes exist?
A: There are B-Tree indexes, R-Tree indexes, hash indexes, covering indexes, clustered indexes, multicolumn or composite SQL indexes, and prefix indexes.

Q: What is the most popular type of a mysql index?
A: A B-tree sql index is the most popular type of a mysql index.

#database #mysql #web #shorts #reels #webdevelopment #developer