Install MySQL on CentOS 7
原文:https://devops.profitbricks.com/tutorials/install-mysql-on-centos-7/
1.下载mysql
在mysql官网选择适合的mysql版本(Red Hat Enterprise Linux 7 / Oracle Linux 7 for this tutorial) 点击 Download 。
右键复制No thanks, just start my download.的链接。
sudo rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
2.安装mysql
现在就可以用yum命令安装mysql了
yum -y install mysql-community-server
3.mysql的启动、重启、停止
systemctl start mysqld #启动mysql服务
systemctl restart mysqld #启动mysql服务
systemctl stop mysqld #停止mysql服务
systemctl enable mysqld #开机启动mysql服务
systemctl status mysqld #查看mysql服务运行状态
4. 初始化mysql
mysql_secure_installation#命令将帮你安全初始化mysql
Set root password? [Y/n] Y
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y
5.防火墙设置
MySQL listens on TCP port 3306 by default.
If the CentOS firewall is enabled, then a rule allowing access to the MySQL server on port 3306/tcp from host192.0.2.10 can be added.
firewall-cmd --permanent --zone=trusted --add-source=192.0.2.10/
firewall-cmd --permanent --zone=trusted --add-port=/tcp
firewall-cmd --reload
6.创建数据库用户
The following steps will describe creating a new database named appdb and granting the appuser full access to the new database.
Adjust the hostname from which the user will be connecting and password as necessary.
mysql> create database appdb;
mysql> grant all on appdb.* to 'appuser'@'localhost' identified by 'password';
mysql> quit
Install MySQL on CentOS 7的更多相关文章
- How to Install MySQL on CentOS 7
CentOS 7的yum源中貌似没有正常安装mysql时的mysql-sever文件,需要去官网上下载 # wget http://dev.mysql.com/get/mysql-communit ...
- Install MySql on CentOS
Installing & Configuring MySQL Server This Howto will show you how to install MySQL 5.x, start t ...
- yum install mysql on centos 6.5 zz
http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html 1.使用yum命令进行mysql的安装 yum list ...
- How to install MySQL on CentOS
1)chekc centos中是否安装了MySQL [root@localhost MySQL]# rpm -qa | grep mariadb mariadb-libs-5.5.52-1.el7.x ...
- Install Apache, PHP And MySQL On CentOS 7 (LAMP)
This tutorial shows how you can install an Apache2 webserver on a CentOS 7.0 server with PHP5 suppor ...
- Install MySQL 5.7 on Fedora 25/24, CentOS/RHEL 7.3/6.8/5.11
MySQL is a relational database management system (RDBMS) that runs as a server providing multi-user ...
- yum mysql on centos 7
参考:https://www.linode.com/docs/databases/mysql/how-to-install-mysql-on-centos-7 centos 7上没有办法使用yum i ...
- Mysql之CentOS初探
1. 卸载mysql 查看CentOS是否已经安装mysql数据库 rpm -qa | grep mysqlrpm -qa | grep MySQL 如果有,则卸载 // --nodeps表示强制rp ...
- How to install cacti on centos 6
Cacti – Network and performance monitoring tool Cacti is one of best monitoring tool used to monit ...
随机推荐
- hihoCoder 后缀自动机三·重复旋律6
后缀自动机三·重复旋律6 时间限制:15000ms 单点时限:3000ms 内存限制:512MB 描述 小Hi平时的一大兴趣爱好就是演奏钢琴.我们知道一个音乐旋律被表示为一段数构成的数列. 现在小Hi ...
- 学习笔记——git
恩没错,又是个新东西 使用Git提交文件到版本库有两步: 第一步:是使用 git add 把文件添加进去,实际上就是把文件添加到暂存区. 第二步:使用git commit提交更改,实际上就是把暂存区的 ...
- Werewolf流程分析
werewolf大致流程 首先是房主创建房间,创建成功以后房主开启web socket连接. 其他成员加入房间,加入房间后新成员和老成员的游戏玩家列表都会更新,然后新成员也要开启web socket连 ...
- 10月30日上午MySQL数据库的修改(从网页上实现对数据库的更改)
从网页页面上对数据库进行更改,连接着之前做的增加.删除.查询. 1.先做一个修改页面 <body> <!--这个页面需要让用户看到一些数据,所以不是一个纯php页面,页面效果和增加页 ...
- flask-whooshalchemy需要注意的一点
在学习mega—tutorial时全文搜索模块遇到了问题,那就是使用全文搜索查询出来的数据为空的列表,输出了sql语句后发现where后没有条件,困扰了许久,后来才发现是自己不细心,在进行全文索引时应 ...
- linux中ldconfig的使用介绍
linux中ldconfig的使用介绍 ldconfig是一个动态链接库管理命令,其目的为了让动态链接库为系统所共享. ldconfig的主要用途: 默认搜寻/lilb和/usr/lib,以及配置文件 ...
- live555库中的testH264VideoStreamer实例
1.h264文件的推送 testH264VideoStreamer.cpp文件的开头就定义了 char const* inputFileName = "test.264"; 后面接 ...
- js中join和split的用法
- 认识VTK工作原理
VTk通过数据流实现变信息为图形数据的. 数据流一般为:source-filter--mapper--actor--render--renderwindow--interactor. 要理解工作原理, ...
- IBAction和IBOutlet
- IBAction: - 本质就是void - 能让方法具备连线的功能- IBOutlet - 能让属性具备连线的功能