Home >Database >Mysql Tutorial >MySQL database restoration, recovery and import operations
MySQL is a relational database management system developed by the Swedish MySQL AB company and currently belongs to an Oracle company. MySQL is the most popular relational database management system. In terms of WEB applications, MySQL is one of the best RDBMS (Relational Database Management System) application software.
MySQL is a relational database management system. A relational database stores data in different tables instead of placing all data in one large warehouse, which increases speed and flexibility.
The SQL language used by MySQL is the most commonly used standardized language for accessing databases. MySQL software adopts a dual licensing policy, which is divided into community version and commercial version. Due to its small size, fast speed, low total cost of ownership, especially open source, MySQL is generally chosen as the website database for the development of small and medium-sized websites. .
1. Start - Run - enter cmd and confirm
2. Enter the Dos command line, enter mysql -uroot -p, press Enter and enter the root password to log in to the mysql command line
Command explanation:
mysql -u 用户名 -p
Note:
If the bin path is configured during installation, you can directly enter the mysql command
If the bin path is not configured during installation, you need to switch to the mysql installation directory Enter the mysql command in the bin directory
##3. First create an empty database
create database backup;Command explanation:
create database 数据库名称;
4. Select the database to be restored
use backup;Command explanation:
use 数据库名称;
5. Restore or import the database
source E:\backup.sqlCommand explanationsource database script file;
#6. After restoring or importing, check the database table to see that the import has been successful.
show tables;7. Exit mysql
quit;This will exit mysql and enter the Dos command lineSupplement: Regarding how to use other msyql commands, you can click on the author's business card and find it in the experience list.
The above is the detailed content of MySQL database restoration, recovery and import operations. For more information, please follow other related articles on the PHP Chinese website!