首页 > 数据库技术 > 详细

CentOs 安装 Mysql

时间:2018-05-05 15:11:29      阅读:170      评论:0      收藏:0      [点我收藏+]

本文源于 网上, 我只是加以验证:

https://blog.csdn.net/czmchen/article/details/46645763

https://jingyan.baidu.com/article/86fae346aa437f3c48121a5b.html

1:  安装nysql

# wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
# rpm -ivh mysql-community-release-el7-5.noarch.rpm
# yum install mysql-community-server

2:  启动

# service mysqld restart

3: 进入MySQL 并修改密码:

mysql -uroot
use mysql;
update user set password=password(123456) where user=root;
flush privileges;

4: 远程授权访问;

授权:
grant all on *.* to root@% identified by ‘password with grant option;
//允许账户root从任何主机连接到所有数据库(*.*)
grant all on test.* to user@% identified by password with grant option;
//允许账户user从任何主机连接到test数据库(test.*)
flush privileges; //刷新系统授权表

5: 退出

exit ;

 

CentOs 安装 Mysql

原文:https://www.cnblogs.com/sanmubird/p/8994679.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!