n this tutorial we will learn, how to install MySQL Server 5.6 on CentOS 7 / RHEL 7 . In our previous post, we have installed MySQL Server 5.6 on CentOS 6.x/RHEL 7.x.
In CentOS 7/ RHEL 7 , now MariaDB is introduced as a defualt database. Still many Organisations/Company would like to continue with MySQL. Whereas System Admin who earlier worked on MySQL can easily work on MariaDB. MariaDB is a community-developed fork of the MySQL relational database management system.
MariaDB’s lead developer is Michael “Monty” Widenius, the founder of MySQL and Monty Program AB. He had previously sold his company, MySQL AB, to Sun Microsystems for US$1 billion. MariaDB is named after Monty’s younger daughter, Maria. (Reference taken from Wikipedia)
Install MySQL Server 5.6 on CentOS 7 / RHEL 7
Follow the given below steps to install MySQL Server 5.6 . You must be login with root user in systemDownload the Yum Repo package of MySQL Server 5.6
Download the rpm package, which will create a yum repo file for MySQL Server installation.yum install wget
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
Install mysql-community-release-el7-5.noarch.rpm package
Install this downloaded rpm package by using rpm command.rpm -ivh mysql-community-release-el7-5.noarch.rpmAfter the installation of this package. We will get two new yum repo related to MySQL
[root@localhost ~]# ls -1 /etc/yum.repos.d/mysql-community* /etc/yum.repos.d/mysql-community.repo /etc/yum.repos.d/mysql-community-source.repo [root@localhost ~]#
Installing MySQL Server
By using yum command, now we will install MySQL Server 5.6 . All dependencies will be installed itself.yum install mysql-server
How to start/stop/restart MySQL Server
Now MySQL Server is installed on your system. To start MySQL Service, run commandsystemctl start mysqld
To stop MySQL Service, run command
systemctl stop mysqld
To restart MySQL Service, run command
systemctl restart mysqld
To get status of MySQL Service, run command
systemctl status mysqld
Reset MySQL root password
On fresh installation of MySQL Server. The MySQL root user password is blank. For good security practice, we should reset the password MySQL root user. On newly installed MySQL Server, we generally recommend to use the command script. You have to just follow the instructions.mysql_secure_installation
In another method,you can log into MySQL server database and reset the password in secure way.
mysql -u rootYou will see mysql prompt like this mysql> . Use the below given commands to reset root’s password.
mysql> use mysql; mysql> update user set password=PASSWORD("GIVE-NEW-ROOT-PASSWORD") where User='root'; mysql> flush privileges; mysql> quit
分类: web
标签:
搜索
标签
study
ab
amap
apache
apahe
awk
aws
bat
centos
CFS
chrome
cmd
cnpm
composer
consul
crontab
css
curl
cygwin
devops
di
docker
docker,docker-compose
ethereum
excel
fiddler
fluentd
framework
front-end
git
gitgui
github
glide
go
golang
gorm
grafana
gzip
ioc
item2
iterm2
javascript
jenkins
jsonp
kafka
laradock
laravel
larval
linux
liunux
log
mac
mac, wi-fi
macos
magento
mariaDB
minikube
mongoDB
msp
mysql
netbeans
nginx
nodejs
nohup
npm
nsq
oracle
php
php-fpm
php7
phpstorm
php扩展
Protobuf
python
redis
scp
server
shell
soap
socket
socket5
sql
sre
ssdb
ssh
ssl
study
sublime
swift
system
td-agent
uml
v2ray
vagrant
vagrnat
vim
vpn
vue
vue.js
webpack
webrtc
websocket
webtatic
windows
windows7
word
wps
xdebug
yarn
yii2
yum
zookeeper
世界国家
互联网
以太坊
分类
前端
小程序
打印机
排序算法
搞笑
权限
粤语
缓存
网络
虚拟机
视频
设计模式
项目管理
热门文章
友情链接