Creating MySQL database on Windows system

本文介绍如何在Windows系统上启动MySQL服务器并创建名为“employees”的数据库。通过命令行操作,详细展示了从启动MySQL服务到创建数据库的全过程,并展示了如何查看当前系统上的所有数据库。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  1. Start the MySQL server by issuing the command mysqld-shareware --standalone at the prompt in c:/mysql/bin. Refer the previous session Installing MySQL on Windows for further details.
  2. Now invoke the mysql client program by typing mysql at the prompt.
  3. The prompt is changed to a mysql> prompt. Type:
    create database employees;
    
    (Note: The command ends with a semi-colon).
  4. The MySQL server responds with something like:
    Query OK, 1 row affected (0.00 sec)
    
  5. This means that you have sucessfully created the database. Now, let's see how many databases you have on your system. Issue the following command.
    show databases;
    
    The server responds with the list of databases.
    +----------------+
    | Database       |
    +----------------+
    | employees      |
    | mysql          |
    | test           |
    +----------------+
    3 rows in set (0.00 sec)
    
    Here we have three databases, two created by MySQL during installation and our employees database.
  6. To come back to the DOS prompt, type quit at the mysql prompt.

http://www.webdevelopersnotes.com/tutorials/sql/mysql_primer_creating_a_database.php3

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值