create database dbname create database dbname [default character set latin1 collate latin1_general_ci]
dos命令创建数据库?是mysql行命令吧shell> mysql -u root Enter password: ********mysql> CREATE DATABASE menagerie;
== 思想重于技巧 ==
C:\>mysql -u root -p Enter password: ***** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 19 Server version: 5.2.0-falcon-alpha-community-nt MySQL Community Server (GPL)Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> create database aaa -> ; Query OK, 1 row affected (0.02 sec)mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | aaa | | fdb | | mysql | | sdb | | test | +--------------------+ 6 rows in set (0.01 sec)mysql>
二楼的大哥,我那是windows下的,用那个命令好像有问题?
二楼的就是给你windows下的 只是不小心忘写了-p 而以 哈哈
你最好先看一下mySQL的文档
== 思想重于技巧 ==
你最好先看一下mySQL的文档C:> mysql -u root -p --execute="create database Test"
== 思想重于技巧 ==
我对两位的崇拜犹如滔滔江水,连绵不绝。 mysql -u root -p --execute="create database Test" 这句还要输入密码,能不能连密码都一块执行。
mysql -u root -p12345 --execute='create database Test' 建议你执行一下这个 mysql -?
Enter password: ********mysql> CREATE DATABASE menagerie;
Enter password: *****
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 19
Server version: 5.2.0-falcon-alpha-community-nt MySQL Community Server (GPL)Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database aaa -> ;
Query OK, 1 row affected (0.02 sec)mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| aaa |
| fdb |
| mysql |
| sdb |
| test |
+--------------------+
6 rows in set (0.01 sec)mysql>
只是不小心忘写了-p 而以
哈哈
建议你执行一下这个
mysql -?