How to install MySQL Server 5.6 on CentOS 7 / RHEL 7
2014-08-20 23:41
471 查看
the article address : http://sharadchhetri.com/2014/07/31/how-to-install-mysql-server-5-6-on-centos-7-rhel-7/
n 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)
Follow the given below steps to install MySQL Server 5.6 .
You must be login with root user in system
Download the rpm package, which will create a yum repo file for MySQL Server installation.
Install this downloaded rpm package by using rpm command.
After the installation of this package. We will get two new yum repo related to MySQL
By using yum command, now we will install MySQL Server 5.6 . All dependencies will be installed itself.
To start MySQL Service, run command
To stop MySQL Service, run command
To restart MySQL Service, run command
To get status of MySQL Service, run command
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.
In another method,you can log into MySQL server database and reset the password in secure way.
You will see mysql prompt like this mysql> . Use the below given commands to reset root’s password.
n 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 system
Download the Yum Repo package of MySQL Server 5.6
Download the rpm package, which will create a yum repo file for MySQL Server installation.1 | yum install wget |
1 | 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.1 | rpm -ivh mysql-community-release-el7-5.noarch.rpm |
1 2 3 4 | [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.1 | yum install mysql-server |
How to start/stop/restart MySQL Server
Now MySQL Server is installed on your system.To start MySQL Service, run command
1 | systemctl start mysqld |
1 | systemctl stop mysqld |
1 | systemctl restart mysqld |
1 | 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.
1 | mysql_secure_installation |
1 | mysql -u root |
1 2 3 4 | mysql> use mysql; mysql> update user set password=PASSWORD("GIVE-NEW-ROOT-PASSWORD") where User='root'; mysql> flush privileges; mysql> quit |
相关文章推荐
- How to Install LAMP (Apache 2.4, MySQL 5.6, and PHP 5.4) on CentOS/RHEL 7
- How to Install MySQL 5.6 on CentOS 6.3/RedHat EL6/Fedora
- Install MySQL Server 5.6 on CentOS 7 / RHEL 7
- How to Install MySQL 5.6 on CentOS 6.3/RedHat EL6/Fedora
- How to Install Tomcat 7.0.68 Server on CentOS/RHEL 7/6/5
- How to install redis server on CentOS 7 / RHEL 7
- How To Install Drupal on a Virtual Server Running CentOS 6
- How to Install GUI (Gnome 3) Using CD/DVD on RHEL/CentOS 7
- howto install Oracle VirtualBox Guest Additions on Fedora, CentOS and Red Hat (RHEL).
- How To Install Speedtest-cli On a CentOS / RHEL / Scientific / Fedora Linux To Check Internet Speed
- How to install Apache Server on CentOS RedHat Linux, How to configure Apacahe Server on CentOS RedHat Linux | Antoine Solutions Development
- How to Install Linux, Apache, MySQL, PHP (LAMP) stack on CentOS 6 【Reliable】
- How to Install Apache OpenOffice on RHEL/CentOS
- HOW TO INSTALL PHANTOMJS ON A CENTOS SERVER
- How to Install RSyslog+MySQL with LogAnalyzer on CentOS
- Howto install VMware tools on Centos 6.3 or Redhat 6.3 RHEL
- How to Install Linux, Apache, MySQL, PHP (LAMP) stack on CentOS 6
- How to Install Ruby 2.1.1 on CentOS & RHEL 6 using RVM
- How to Install MySQL Database Using Yum groupinstall on CentOS
- How to install SVN server with USVN, Apache, mod_dav_svn on CentOS 6