- Volume Management
- Package Management
- Shell Scripting
- System Updates
- Backup and Recovery
- Log Management
- Traffic Monitoring in CentOS
- Remote Management
- Install Anonymous FTP
- Set Up Postfix MTA and IMAP/POP3
- MySQL Setup On CentOS 7
- Install Apache Web Server CentOS 7
- Create SSL Certificates
- Install and Configure Open LDAP
- Set Up Perl for CentOS Linux
- Configure Ruby on CentOS Linux
- Set Up Python with CentOS Linux
- Configure PHP in CentOS Linux
- Firewall Setup
- Process Management
- Resource Mgmt with crgoups
- Resource Mgmt with systemctl
- Systemd Services Start and Stop
- Quota Management
- User Management
- File / Folder Management
- Basic CentOS Linux Commands
- CentOS Overview
- Home
Linux Admin Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Linux Admin - MySQL Setup On CentOS 7
As touched upon briefly when configuring CentOS for use with Maria DB, there is no native MySQL package in the CentOS 7 yum repository. To account for this, we will need to add a MySQL hosted repository.
MariaDB vs MySQL On CentOS Linux
One thing to note is MySQL will require a different set of base dependencies from MariaDB. Also using MySQL will break the concept and philosophy of CentOS: production packages designed for maximum repabipty.
So when deciding whether to use Maria or MySQL one should weigh two options: Will my current DB Schema work with Maria? What advantage does instalpng MySQL over Maria give me?
Maria components are 100% transparent to MySQL structure, with some added efficiency with better pcensing. Unless a compelpng reason comes along, it is advised to configure CentOS to use MariaDB.
The biggest reasons for favoring Maria on CentOS are −
Most people will be using MariaDB. When experiencing issues you will get more assistance with Maria.
CentOS is designed to run with Maria. Hence, Maria will offer better stabipty.
Maria is officially supported for CentOS.
Download and Add the MySQL Repository
We will want to download and install the MySQL repository from −
Step 1 − Download the Repository.
The repository comes conveniently packaged in an rpm package for easy installation. It can be downloaded with wget −
[root@centos]# wget http://repo.mysql.com/mysql-community-release-el75.noarch.rpm --2017-02-26 03:18:36-- http://repo.mysql.com/mysql-community-release-el75.noarch.rpm Resolving repo.mysql.com (repo.mysql.com)... 104.86.98.130
Step 2 − Install MySQL From YUM.
We can now use the yum package manager to install MySQL −
[root@centos]# yum -y install mysql-server
Step 3 − Start and Enable the MySQL Daemon Service.
[root@centos]# systemctl start mysql [root@centos]# systemctl enable mysql
Step 4 − Make sure our MySQL service is up and running.
[root@centos]# netstat -antup | grep 3306 tcp6 0 0 :::3306 :::* LISTEN 6572/mysqld [root@centos]#
Note − We will not allow any firewall rules through. It s common to have MySQL configured to use Unix Domain Sockets. This assures only the web-server of the LAMP stack, locally, can access the MySQL database, taking out a complete dimension in the attack vector at the database software.
Advertisements