Note that the operator ( >) means exporting. Suppose, you want to dump the database objects and data of the classicmodels database into an SQL file located at D:\db folder, here is the command: >mysqldump -u root -p classicmodels > d:\db\classicmodels.sqlīasically, this command instructs mysqldump to log in to the MySQL server using the root user account with a password and exports the database objects and data of the classicmodels database to d:\db\classicmodels.sql. Dump database objects and data into SQL file using the mysqldump tool. MySQL database server returns the following output: - Īs you see, we have created the classicmodels_backup database successfully. Third, use SHOW DATABASES command to verify: > SHOW DATABASES Code language: SQL (Structured Query Language) ( sql ) Then, use CREATE DATABASE statement as follows: > CREATE DATABASE classicmodels_backup Create the classmodels_backup database:įirst, log in to MySQL database server: >mysql -u root -pĬode language: SQL (Structured Query Language) ( sql )
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |