centos7下快速安装mysql
来源:互联网 发布:华林证券软件 编辑:程序博客网 时间:2024/06/08 04:49
centos7下快速安装mysql
CentOS 7的yum源中貌似没有正常安装mysql时的mysql-sever文件,需要去官网上下载
1
2
3
# 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
成功安装之后重启mysql服务
1
# service mysqld restart
初次安装mysql是root账户是没有密码的
设置密码的方法
# mysql -uroot
mysql> set password for ‘root’@‘localhost’ = password('mypasswd');
mysql> exit
搞定!
远程授权连接mysql
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
FLUSH PRIVILEGES;
Centos7 关闭防火墙
1直接关闭防火墙
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
2、设置 iptables service
yum -y install iptables-services
如果要修改防火墙配置,如增加防火墙端口3306
vi /etc/sysconfig/iptables
增加规则
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
保存退出后
systemctl restart iptables.service #重启防火墙使配置生效
systemctl enable iptables.service #设置防火墙开机启动
最后重启系统使设置生效即可。
0 0
- centos7下快速安装mysql
- centos7下快速安装mysql
- centos7下快速安装mysql
- centos7下快速安装mysql
- centos7下快速安装mysql
- centos7下快速安装mysql
- centos7下快速安装mysql
- centos7下快速安装mysql
- centos7下快速安装mysql
- centos7下快速安装mysql
- centos7下快速安装mysql
- CentOS7下快速安装MySQL
- centos7下快速安装mysql-yum安装
- mysql(mariadb)在centos7下的快速安装以及启动
- centos7下yum快速安装mariadb(mysql)
- 自总结之在Centos7下快速安装mysql
- CentOS7下mysql安装
- CentOS7 下安装 mysql
- android学习笔记 SurfaceView模板
- iOS linker错误之Undefined symbols for architecture arm64
- 魔法顶层复原
- Android环境下使用net.sf.JSONObject问题出现BUG
- LinkedHashMap剖析
- centos7下快速安装mysql
- tcproxy 使用介绍
- ionic后退按钮 有时候出现 有时隐藏
- Introduction to C++ Programming in UE4——UE4官方文档翻译与理解(二)
- android 记住用户名关键代码
- Android 开发技巧 - Android 6.0 以上权限大坑和权限检查基类封装
- 安卓 OKHTTP 简单示例
- 疑问:
- Setting 的首页加载过程