wget http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql-community-server
service mysqld start
grep "password" /var/log/mysqld.log
mysql -uroot -p
set global validate_password_policy=0; #修改密码安全策略为低(只校验密码长度,至少8位)。
ALTER USER 'root'@'localhost' IDENTIFIED BY '12345678';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '12345678';
service mysqld stop
1、展示所有数据库
show databases;
2、新增一个数据库
create database DATABASE_NAME;
3、删除一个数据库
drop database DATABASE_NAME;
4、选择要操作的数据库
use DATABASE_NAME;
5、查看所有表
show tables;