A sample iptables rule to open Linux iptables firewall /sbin/iptables -A INPUT -i eth0 -p tcp -destination-port 3306 -j ACCEPT You need to open TCP port 3306 using iptables or BSD pf firewall. Type exit command to logout mysql: mysql> exit Step # 7: Open port 3306
#MYSQL WORKBENCH CANNOT START SSH TUNNEL MANAGER UPDATE#
Mysql> update user set Host='202.54.10.20' where user='webadmin' Step # 6: Logout of MySQL Let us assume that you are always making connection from remote IP called 202.54.10.20 for database called webdb for user webadmin, To grant access to this IP address type the following command At mysql> prompt for existing database, enter: Mysql> GRANT ALL ON foo.* TO IDENTIFIED BY 'PASSWORD' How Do I Grant Access To An Existing Database? If you want to add a new database called foo for user bar and remote IP 202.54.10.20 then you need to type the following commands at mysql> prompt: mysql> CREATE DATABASE foo $ mysql -u root -p mysql Grant access to a new database # service mysql-server restart Step # 5 Grant access to remote IP address # /usr/local/etc/rc.d/mysql-server restart If you are using FreeBSD, type the following command to restart the mysql server: If you are using RHEL / CentOS / Fedora / Scientific Linux, type the following command to restart the mysql server: If you are using Debian / Ubuntu Linux, type the following command to restart the mysql server: Since you need to allow remote connection this line should be removed from my.cnf or put it in comment state. This option is highly recommended for systems where only local requests are allowed. All interaction with mysqld must be made via Unix sockets. skip-networking : Do not listen for TCP/IP connections at all.Make sure line skip-networking is commented (or remove line) and add following line bind-address=YOUR-SERVER-IPįor example, if your MySQL server IP is 65.55.55.2 then entire block should be look like as follows: # vi /etc/my.cnf Step # 3: Once file opened, locate line that read as follows If you are using FreeBSD you need to create a file /var/db/mysql/my.cnf location.
If you are using Red Hat Linux/Fedora/Centos Linux file is located at /etc/my.cnf location.If you are using Debian/Ubuntu Linux file is located at /etc/mysql/my.cnf location.Once connected you need to edit the MySQL server configuration file my.cnf using a text editor such as vi: