Mysql database creation method: first install and download mysql, and open cmd; then enter mysqld to start the mysql server; then view all current databases; finally create the database, the code is [create database database name;].
【Related learning recommendations: mysql learning】
Mysql database creation method:
1. Download mysql, install it, then open cmd, cd to the directory where mysql is located, and then enter mysqld to start the mysql server
2. View all current databases: show databases;
3. Create a database: create database database name; (The test_db database is created here, and then use the 1 command to view all databases)
4. The database has been created here. The next step is to create a database table. For example, we create a table for tb_user in test_db. The table contains the fields email and password.
Switch the current database to test_db
Command use test_db;
5. Create the table TB_USER. After the creation is successful, use show tables to see if the table is created successfully
The above is the detailed content of How to build a database in mysql. For more information, please follow other related articles on the PHP Chinese website!