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 ...
随机推荐
- 用gulp打包带参数资源做法与asp.net/java项目结合的自动构建方案探讨
先探讨方案,后续再实现. gulp打包前端教程配置:http://www.cnblogs.com/EasonJim/p/6209951.html 可能存在以下场景: 1.整个服务端采用接口的形式暴露给 ...
- TypeScript Type Innference(类型推断)
在这一节,我们将介绍TypeScript中的类型推断.我们将会讨论类型推断需要在何处用到以及如何推断. 基础 在TypeScript中,在几个没有明确指定类型注释的地方将会使用类型推断来提供类型信息. ...
- Python的方法解析顺序(MRO)[转]
本文转载自: http://hanjianwei.com/2013/07/25/python-mro/ 对于支持继承的编程语言来说,其方法(属性)可能定义在当前类,也可能来自于基类,所以在方法调用时就 ...
- Join Attributes
1. IWorkspaceFactory2 workspaceFactory = new ShapefileWorkspaceFactoryClass() as IWorkspaceFactory2; ...
- QT读取文本(字符串)最后一行的方法
QString str; QTextStream ts(&str); str = this->toPlainText(); ts.seek(str.lastIndexOf("- ...
- [NHibernate]HQL查询
目录 写在前面 文档与系列文章 查询的几种方式 HQL查询 一个例子 总结 写在前面 上篇文章介绍了nhibernate在项目中的基本配置,包括数据库连接字符串的设置,映射文件的配置及需注意的地方,这 ...
- R语言-处理异常值或报错的三个示例
博客总目录:http://www.cnblogs.com/weibaar/p/4507801.html Tuesday, March 31, 2015 之前用rvest帮人写了一个定期抓取amazon ...
- [Hadoop] 在Ubuntu系统上一步步搭建Hadoop(单机模式)
1 Hadoop的三种创建模式 单机模式操作是Hadoop的默认操作模式,当首次解压Hadoop的源码包时,Hadoop无法了解硬件安装环境,会保守地选择最小配置,即单机模式.该模式主要用于开发调试M ...
- JavaScript闭包(Closure)学习笔记
闭包(closure)是JavaScript语言的一个难点,也是它的特色,很多高级应用都要依靠闭包实现. 下面就是我的学习笔记,对于JavaScript初学者应该是很有用的. 一.变量的作用域 要理解 ...
- JAVA的i++, i+=1, i=i+1有区别吗?
看一些JAVA基础题的时候,经常看到这个问题,很多人的解释是:i++最快,i+=1其次,i=i+1最慢.下面通过Sun JDK编译出来的字节码验证一下这个问题. 为了让编译出来的字节码便于阅读,将这三 ...