1.先安装mysql服务
yum install -y mysql-server
2.开启服务
service mysqld start
3.设置开机启动
chkconfig mysqld on
4.安装mysql客服端
yum install -y mysql-connector-java
5.创建数据库
create database if not exists eshop;
6.创建用户
grant all privileges on eshop.* to 'eshop'@'%' identified by 'eshop';
7.创建表
create table user(name varchar(255), age int)
8.插入数据
insert into user values(‘张三’, 25)