用mysql命令创建MYSQL数据库(Windows下)

1,首先进入数据库

开始菜单-运行-cmd-mysql -uroot -p

Microsoft Windows [版本 5.2.3790]
(C) 版权所有 1985-2003 Microsoft Corp.

C:\Documents and Settings\Administrator>mysql -uroot -p
Enter password:

然后输入密码:

登陆成功显示

C:\Documents and Settings\Administrator>mysql -uroot -p
Enter password: *********
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 57
Server version: 5.1.46-community MySQL Community Server (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserve
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statem

mysql>

2,用show语句查找当前服务器存在哪些数据库

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

3.创建一个数据库windme

mysql> create database windme;
Query OK, 1 row affected (0.00 sec)
4,进入你刚才创建的数据库

mysql> use windme
Database changed

这样一个数据库就创建成功了

 


您对本文的评分:
当前平均分: 9.8(2 次打分)

评论:

南宁婚纱摄影
2012-08-03 17:29
学过sql但也忘了差不多了
ways-to-make-money
2011-10-24 16:16
You should update www.windme.org more often, but i love it!
<a href=http://www.facebook.com/pages/Ways-to-make-money/138192036280761>ways to make money</a>
buy ugg boots
2010-11-27 16:12
很难

Post a Comment

Type your comment out: