发表于|更新于|mysql

|总字数:115|阅读时长:1分钟|浏览量:|

0、安装过程自行百度,都可以百度到。安装完成后,进入mysql命令行模式。

1
mysql -u root -p

1、新建、查看数据库

1
create database bookstore;
1
show databases;

2、在指定数据库中创建表。

1
use test
1
2
3
4
5
6
7
create table user
(
id        int auto_increment not null,
username   varchar(10) not null,
password   varchar(10) not null,
primary    key(id)
);
1
show tables;
1
descirbe tables;

3、向表中加入数据记录。

1
2
insert into user values(1,'yu','yu');
insert into user values(2,'zhouhejun','19830925');

版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 qubeijun的博客

赞助

  • 微信

    微信

  • 支付宝

    支付宝