Mysql为何创建不了数据库?

求救!!!
2024-11-07 22:51:39
推荐回答(1个)
回答(1):

1、你输入的语法不对
2、主服务器Mysql,建立数据库,并在这个库中建表插入一条数据:

mysql> create database hi_db;
Query OK, 1 row affected (0.00 sec)

mysql> use hi_db;
Database changed

mysql> create table hi_tb(id int(3),name char(10));
Query OK, 0 rows affected (0.00 sec)

mysql> insert into hi_tb values(001,'bobu');
Query OK, 1 row affected (0.00 sec)

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| hi_db |
| mysql |
| test |
+--------------------+
4 rows in set (0.00 sec)