MySQL - Backup, Restore, Copy Tables and Databases

preview_player
Показать описание

Backing up tables and databases is very useful when you are learning to update records so that you can recover quickly when you do something wrong.

create table if not exists newTable like oldTable; – Copies schema of old table to new table (columns, data types, etc). IF NOT EXISTS makes sure you do not overwrite a table you already created.

insert newTable select * from oldTable; – copies all records from old table into new table

LINUX SHELL mysqladmin -u username -p create newDatabase – creates database from linux shell

Рекомендации по теме
Комментарии
Автор

I agree. It's a matter of "when" rather than "if" we do something stupid. I can't live anymore knowing I don't have any backup of my live DB. Thank you so much!!!

andresbacalao
Автор

Thanks for this detailed tutorial, i have been struggling for ages. Many thanks and subscribed as gratitude ✌✌

RashidKhan-tzct
Автор

Your videos are so helpfum man. You have a really good accent man. With a lot of explainations.

hichamichou
Автор

I am a php dev who wants to get into dba in the future. this as a resource is brilliant. will be following this channel from now on

solarcorona
Автор

Thank you for explaining things in details and raise the awareness of what we need to pay attention to or look out for. Best tutorial ever!!! Much appreciate your works. Thank you again!

DucNguyen-qnie
Автор

And how can I to backup a database that is a terabytes of size ? It is not possible to create a plane text backup of this kind of databases, please explain more on this

jorgeguerrero
Автор

Could you please make a video on mysql triggers...

shahbaaz
Автор

by the time you've typed out a couple hundred thousand lines of code, you'll understand code better than English, or whatever your native language is.

JessieCrypto
Автор

for anyone trying to load the file in windows powershell you have to use this scheme: the "<" doesnt work for the upload in windows

Get-Content | mysql -u root -p -h 192.168.68.10 -P 23306 datasets

cyberlando
Автор

This is probably a bit far ahead of this stage you are teaching, but I have databases with, some millions of records. Numerous millions, with rather extensive data. Really, I have a couple TB of additional data I would like to parse, sort, and database. (No it's not porn hahah, all CSV data) I do have some serious hardware, that is not the problem, but either my efficiency in SQL is lacking, or there has to be a better system than SQL for super large data Question: What should I type into trusty old scroogle to educate myself how to best accomplish databasing, or database-like storage and accessibility of Terrabytes of records?? NoSQL? Or just build out a CSV parser to my needed specifications? I dunno...

JessieCrypto