Ill be discussing the basic steps to hardening mysql...
One of the most basic steps that one can take is restricting remote access to the server. The default port on whic mysql works is 3306. Using any host-based firewall like IPtables one should restrict access to this port.
Now be sure to change your default root username and root password. As the default password is same for everyone it can be easily guessed. So be sure to change it. Remove any anonymous account that you find in the database or any account with no password as it may provide access to the system.
Remove the sample database "test" that is created by default at the time of installation and always run mysql as an unprivileged user. Always grant minimum level permission to a user and limit access to the mysql logs. Encrypt the mysql data using inbuilt functions and keep a track of the latest patches coming out.
Also be sure to remove the mysql server history.
Backing up and restoring mysql data...
Now backing up of mysql data can be done in two ways.. either one can copy the raw mysql databse files or export tables to a text file
Now as mysql uses the same format on all platforms so one can copy the mysql data i.e tables and index files from one node and store and use it on another node.
Another way is use the mysqldump utility to backup the mysql database to text files.
Now restoring data is very easy after backup. Just use the command "mysql" with administrator privileges and give the .sql file as input and u r done...
thats all for now.... :)
No comments:
Post a Comment