安装mysql数据库

1,安装mysql服务器

yum -y install mysqld

2, 关闭防火墙和selinux

service iptables stop

setenforce 0

3, 查看mysql数据库的版本信息

top

4, 启动mysql服务

service mysqld start

5, 修改mysql的root密码

set password for root@127.0.0.1 = password('bw1703a');

6, 登录mysql,在mysql中新建以项目为名的数据库

create database 1703A:

use 1703A:

7, 新建的数据库中新建wg的表,并插入两行数据

create tables wg (name char(30),age char(20),xing char(40)

8,查看表结构

show tables wg:

9, 删除wg表中的一列数据

drop database name=xiao:

 

posted on 2019-09-29 10:02  哇哈哈哈哈·  阅读(142)  评论(0)    收藏  举报