centos安装mysql 在线安装

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lin443514407lin/article/details/85249583

yum install mysql-server -y
service mysqld start
chkconfig mysqld on
chkconfig --list mysqld

mysql 进入mysql命令行接口
mysql -u root;
use mysql;
select user, host, password from user;
CREATE USER 'yishikeji'@'%' IDENTIFIED BY 'yishikeji';
GRANT ALL PRIVILEGES ON *.* TO 'yishikeji'@'%' IDENTIFIED BY 'yishikeji' WITH GRANT OPTION;

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123' WITH GRANT OPTION;
delete from user where host != '%';
select user, host, password from user;

flush privileges;


退出重新登录
mysql -u root -p

猜你喜欢

转载自blog.csdn.net/lin443514407lin/article/details/85249583