1. CMD Connection Database
mysql-hlocalhost-uroot-p123//Mysql-uroot (because I am local and no password is set)
2. Renaming data tables and moving data tables
MySQL has: Database samp_db, which has data table students,teachers.
Now I'm going to move the table under the school_db, specifically:
Note: The command to rename the database was removed, and the Rename Database command was removed. The reason is the loss of data. Specific reasons for the official website, but do not understand
New database: school_db;
Mobile Data sheet: Rename table samp_db.students to school_db.students, rename table Samp_db.teachers to school_db.teachers; After the move samp_db there is no data table.
Delete previous databases: Drop database samp_db;
3. Exporting databases and data tables
Export Database School_db:c:\>mysqldump-uroot school_db > e:\school_db.sql;
Structure of the exported database: C:\>mysqldump-uroot school_db--add-drop-table> e:\school_db_stru.sql;
Exporting data tables in a database students:c:\>mysqldump-uroot school_db students > e:\school_db_students.sql;
MySQL database and data table operations