Configuring Mysql to Allow External Connections

Setting up Mysql to allow users to connect externally

1. You have to specifically define how users can connect to the database.

GRANT ALL PRIVILEGES ON dbname.* TO username@'IP' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON dbname.* TO username@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON dbname.* TO username@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON dbname.* TO username@'127.0.0.1' IDENTIFIED BY 'password';

2. Open port 3306 in firewalls

3.) to grant httpd the access to the network. To allow the httpd dameon to connect to port 3306 when you've told zend to connect to the database externally
setsebool -P httpd_can_network_connect=1

0 comments:

Post a Comment