How To Install MySQL on CentOS:- MySQL is a popular open-source relational database management application. It forms part of the LAMP Stack (Linux, Apache, MySQL, PHP), a software stack that powers web servers.
This article will walk you through how to install MySQL on CentOS 7.
Installing MySQL 5.6 on CentOS 7
1. Open your Terminal and run this command.
$ yum update -y
2. Then run this command for Install Community Repository
$ rpm -Uvh http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm $ rpm -ivh mysql-community-release-el7-5.noarch.rpm
3. And then run the following command
yum install mysql mysql-server
4. Start MySQL and Enable Auto-Start after booting
$ systemctl start mysqld $ systemctl enable mysqld
Secure MySQL Server
Now you ready to use MySQL server but before using that you need to secure MySQL server. Run the following command for Secure MySQL Server
Check your MySQL Client and Server are Working
$ mysql -V
Now you have Successfully Install MySQL on CentOS 7. Next, you have to access your Database and Create a table.
How to login my MySQL Database
Follow the below Steps for Connect your MySQL database using the terminal:-
- Connect to Mysql on the server using MySQL password.
# mysql -u root -p
2. Now create a new database using the below command.
> create database (dbname);
3. Now we will provide access to the user to the newly created database.
> grant all privileges on (dbname).* to '(username)'@'%' identified by '(password)'
4. Now save changes using commit command and exit.
> commit >\q
Mysql Db Backup & Restore
Congratulation now you are know that how to install the database servers. Above all commands are good to start for beginners. Start more learning with our other blog link here.
We hope you are like this article and this is useful for you. If you learn more about Linux, AWS Tips, and Tricks Please Bookmark this Website. We are Daily Publish New Article in this Website WWW.BPMTECHGURU.IN and all post on this website is practically tested and 100% Work if you have any Problem Please Drop a Comment we are trying to resolve your problem.