Search
 
SCRIPT & CODE EXAMPLE
 

SQL

Create Backup

Create the backup
Open the CLI
type mysql -u root -p and hit ENTER
enter your root password to login into the MySQL Shell
type the MySQL command show databases; and hit ENTER
verify that the Sakila DB is indeed present
+--------------------------+
| Database                 |
+--------------------------+
| information_schema       |
| sakila                   |
+--------------------------+
type the MySQL command exit; and hit ENTER
now, outside the mysql shell type the command mysqldump -u root -p sakila > ~/Desktop/sakila_backup.sql and hit ENTER
type the command ls -al ~/Desktop and hit ENTER 
verify that the file "sakila_backup.sql" exists on your desktop
type the command cat ~/Desktop/sakila_backup.sql and hit ENTER and watch all the data fly by
SUCCESS! We've created the backup. That sakila_backup.sql file contains all the schema information and all the data contained in the Sakila DB.
Comment

PREVIOUS NEXT
Code Example
Sql :: select all column 
Sql :: suse stop MySQL 
Sql :: insert statement with $1 
Sql :: Limiting a left join to returning one result? 
Sql :: postgresql Change role for the current session to the new_role 
Sql :: creating a simple notify in postgresql 
Sql :: Template MySQL Zabbix agent 
Sql :: product of a column in mysql 
Sql :: sql not null constraint 
Sql :: PSQL qith variables 
Sql :: SQLALCHEMY track is set to true or false 
Sql :: multiple row join 
Sql :: postgres add column at position 
Sql :: mysql update all record removing 2 hours from column 
Sql :: mysql check if entry exists 
Sql :: não é possível executar uma operação DML dentro de uma consulta 
Sql :: ring get a list of tables inside the database using the odbc_tables() 
Sql :: mode sql course 
Sql :: cara menampilkan tabel yang tidak mengandung kata di sql server 
Sql :: select from another database 
Sql :: restore backup 
Sql :: Jenkins SQLCMD run 
Sql :: mysql query problems and solutions 
Sql :: sql server convert string list integers list 
Sql :: find Overlapping sql 
Sql :: inserting values with beekeeper get error null value in column createdAt violates not-null constraint 
Sql :: http://localhost:9200/_cluster/allocation/explain 
Sql :: BSD sed: extra characters at the end of d command 
Sql :: What is performance wise better join or a subquery ? 
Sql :: SQL IN Operator With Columns 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =