After you've installed MySQL and its required dependencies in your server, configure it using the following steps.
1. Start the MySQL service:
2. Log into your MySQL service, the password should be empty:
3. Update the password for the user account root of your MySQL service:
4. Create a new MySQL database for testing purposes:
5. Add a new user account for accessing your new MySQL database:
6. Grant all access to the database <db name>:
7. Change the default runlevels for your MySQL service:
9. Edit the file "/etc/hosts.allow" that's the hosts access control list for allowing access to services on your server from specific hostnames, IP addresses, networks, and FQDNs:
10. Edit the file "/etc/hosts.deny" that's the hosts access control list for denying access to services on your server from specific hostnames, IP addresses, networks, and FQDNs:
11. Allow incoming and outgoing client connections to your MySQL service through your firewall:
1. Start the MySQL service:
/etc/init.d/mysql start;
2. Log into your MySQL service, the password should be empty:
mysql -u root -p;
3. Update the password for the user account root of your MySQL service:
UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';
FLUSH PRIVILEGES;
4. Create a new MySQL database for testing purposes:
CREATE DATABASE <db name>;
5. Add a new user account for accessing your new MySQL database:
INSERT INTO mysql.user (User,Host,Password) VALUES('user name','host',PASSWORD('password'));
FLUSH PRIVILEGES;
6. Grant all access to the database <db name>:
GRANT ALL PRIVILEGES ON <db name>.* to <user name>@<host>;
FLUSH PRIVILEGES;
7. Change the default runlevels for your MySQL service:
chkconfig --levels 35 mysql on;
8. Automatically start your MySQL service on boot up:
update-rc.d mysql <options>;
9. Edit the file "/etc/hosts.allow" that's the hosts access control list for allowing access to services on your server from specific hostnames, IP addresses, networks, and FQDNs:
<service or wildcard>: <hostname> <ip address>/<subnet mask> <fqdn>
10. Edit the file "/etc/hosts.deny" that's the hosts access control list for denying access to services on your server from specific hostnames, IP addresses, networks, and FQDNs:
<service or wildcard>: <hostname> <ip address>/<subnet mask> <fqdn>
11. Allow incoming and outgoing client connections to your MySQL service through your firewall:
iptables -A INPUT -i <interface> -p tcp --dport 3306 -j ACCEPT
iptables -A OUTPUT -o <interface> -p tcp --sport 3306 -j ACCEPT
Do you have a suggestion about how to improve this blog? Let's talk about it. Contact me at David.Brenner.Jr@Gmail.com or 720-584-5229.
Comments
Post a Comment
Comments to this blog will be reviewed within 72 hours. No trolling please