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 ...
随机推荐
- BZOJ3505 [Cqoi2014]数三角形
本文版权归ljh2000和博客园共有,欢迎转载,但须保留此声明,并给出原文链接,谢谢合作. 本文作者:ljh2000作者博客:http://www.cnblogs.com/ljh2000-jump/转 ...
- MySQL二进制安装
前提 version mysql-5.5 platform centos6.x 添加用户 useradd -M -s /sbin/nologin mysql 安装需要的包 yum -y install ...
- 关于分页接口设计(下拉刷新上拉加载原理,解决page count请求重复数据的问题)
- 【原】常用的javascript设计模式
设计模式太多了,貌似有23种,其实我们在平时的工作中没有必要特意去用什么样的设计模式,或者你在不经意间就已经用了设计模式当中的一种.本文旨在总结平时相对来说用的比较多的设计模式. 什么是设计模式 百度 ...
- (转)解决bootstrap 模态框的页面抖动
使用bootstrap时,往往会出现页面抖动的效果,使得用户体验十分不友好. Bootstrap为了让所有的页面(这里指内容溢出和不溢出)显示效果一样,采取的方法如下: 当Modal显示时,设置bod ...
- java List 和Map的使用
一.MAP package net.xsoftlab.baike; import java.util.HashMap;import java.util.Iterator;import java.uti ...
- css 实现三角形 实现过程
1.纯色的全等的三角形实现 下面的就是实际实现 没有宽高 只有边框 都是透明 根据箭头的方向 给边框方法加颜色 比如需要像右箭头 只需要给border-right-color:颜色值; 即可 c ...
- TCP中的RST复位信号
TCP中的RST复位信号 在TCP协议中RST表示复位,用来关闭异常的连接,在TCP的设计中它是不可或缺的. 发送RST包关闭连接时,不必等缓冲区的包都发出去,直接就丢弃缓存区的包发送RST包.而接收 ...
- SQL中SET和SELECT赋值的区别
最近的项目写的SQL比较多,经常会用到对变量赋值,而我使用SET和SELECT都会达到效果. 那就有些迷惑,这两者有什么区别呢?什么时候哪该哪个呢? 经过网上的查询,及个人练习,总结两者有以下几点主要 ...
- tyvj1096 数字组合
描述 在N个数中找出其和为M的若干个数.先读入正整数N(1<N<100)和M(1<M<10000), 再读入N个正数(可以有相同的数字,每个数字均在1000以内), 在这N个数 ...