DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Connect To Mysql Via Another Client

  • submit to reddit
        I needed to connect to MySql database via another client. I first had to add the relevant privileges to the database:

GRANT ALL PRIVILEGES ON <database>.* TO <user>@'%' IDENTIFIED BY '<password>';

Then open up the port in the firewall via /etc/sysconfig/iptables

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT