How To Secure MySQL installation database server is most important in the production environment for big companies and small enterprises. You should not allow remote login on the Database server from outside the network. We can secure and do security tests for the MySQL server in Linux.
The security of the database is important on the server. If you’re using the MySQL server as a database for your application, you can follow the below settings to secure it.
You can also make a connection with https on MySQL server that’s a different process that is not covered here.
There are few points to keep in mind to secure the MySQL Server from an attack.
- Disallow the remote login from outside the network
- Remove default test database from the server
- Make strong password including Uppercase, lowercase, special character and keep minimum 10 digit length
- Remove anonymous login on the server
- Only allow the user to particular database access if needed,
How To Secure MySQL Database Server:
Now Let’s start securing Our MySQL Server,
When you will run this command it will ask you to set the password policy just press on Yes. Next, it will come to ask you to change the root password press enter and put the root password for MySQL Server.
Now we need to remove anonymous users.
We have to disallow remote login.
Now remove the test database from the server and press Yes to reload the privileges table row.
You have to log in to MySQL Server and checked whether the test database removed or not.
mysql -u root -p
Well, Now your MySQL server is secure.
YouTube Link: Secure Mysql
You’re done mysql secure linux security test installation