Linux serverNETWORK ADMINISTRATIONS

How to uninstall MariaDB and install MySQL server on centos7

This video covers the way to install MySQL server and uninstall MariaDB centos7. Let me to show you install MySQL server and uninstall MariaDB in CentOS 7.

How to install MySQL server & remove MariaDB
Steps:
Step #1 remove MariaDB with this command
* yum remove mariadb mariadb-server
* rm -rf /var/lib/mysql
* rm /etc/my.cnf

Step #2 Install Wget with this command
* yum install wget
Download RPM File
* wget https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
Step #3 we’ll install the package:
* rpm -ivh mysql57-community-release-el7-9.noarch.rpm
This adds two new MySQL yum repositories, and we can now use them to install MySQL server:
Step #3 Install MySQL
* yum install mysql-server
Press y to confirm that you want to proceed. Since we’ve just added the package, we’ll also be prompted to accept its GPG key. Press y to download it and complete the install.
Step #4 Starting MySQL & check Status
* systemctl start mysqld
* systemctl status mysqld

Step #5 During the installation process, a temporary password is generated for the MySQL root user.
* grep ‘temporary password’ /var/log/mysqld.log

Step #6 Configuring MySQL
MySQL includes a security script to change some of the less secure default options for things like remote root logins and sample users.
* mysql_secure_installation

This will prompt you for the default root password. As soon as you enter it, you will be required to change it.
Enter a new 12-character password that contains at least one uppercase letter, one lowercase letter, one number and one special character. Re-enter it when prompted.
ou’ll receive feedback on the strength of your new password, and then you’ll be immediately prompted to change it again. Since you just did, you can confidently say No:

Step #7 Testing MySQL
mysql -u root -p (passowrd)

Thanks

source

centos 7

Leave a Reply

Your email address will not be published. Required fields are marked *