I install the MySQL from the Ubuntu server cd(15.04). When installation is finished, I found that the configure files under /etc/MySQL/, such as my.cnf and MySQL.cnf are all empty.So I want access my database from other terminals, I did the following job:(1) Created a user for host '%' with all privileges;(2) Made firewall utw allowing MySQL;(3) insert a line in the my.cnf with: bind-address = 0.0.0.0;(4)restart the MySQL serverice.it does no effect. Remote connect is still denied.I checked the variables in MySQL, the bindaddress variable shows binding with 127.0.0.1. And the netstat command shows that port 3306 is only binded with 127.0.0.1.I don't know why the configure information in my.cnf has no effect?The configure file shows below:mysqldbind-address = 0.0.0.0Any one can help me?
By default, PostgreSQL Server allow access to clients localy using Unix sockets. Here, we’ll show you how to enable the network remote access to PostgreSQL Database Server. – Edit this line in your postgresql.conf file as shown below. All remote access to the server is denied by default. To enable remote access, run the commands below to open MySQL/MariaDB configuration file. Then make the below change below from: After making the change above, save the file and run the commands below to restart the server.
For reasons of security, remote access to MySQL database server is disabled by default because they are considered potential security threats. However, due to some reason, it is necessary to allow access from a remote location or web server. Let assume that we are making connection from remote web server IP called 192.168.0.3 for database called db1 for user user1 at remote MySQL server, 192.168.0.2, then we need to grant access to this IP address.If the remote access is not enable you will get this error: ERROR 1130 (HY000): Host ‘192.168.0.3’ is not allowed to connect to this MySQL serverIP Adress 1: 192.168.0.2 – MySQL Server IP Adress 2: 192.168.0.3 – Web Server (Nginx or Apache). Steps to Enable and Grant Remote Access to MySQL Database Server1.
Edit the my.cnf file: # vim /etc/mysql/my.cnfComment out or remove below line: #bind-address = 127.0.0.12. The following command will allow access to the MySQL database(192.168.0.2) from a remote web server IP address(192.168.0.3): mysql create user 'user1'@'192.168.0.3' identified by 'PASSWORD';mysql grant all on db1. to 'user1'@'192.168.0.3';3.
Test the connection from the remote web server: # mysql -u user1 -pPASSWORD -h 192.168.0.24. Verify the user privileges for user1: mysql select. from informationschema.userprivileges where grantee like 'user1'%';5. In case you want to revoke all options the access from all machine or web server(192.168.0.3) only: mysql revoke all privileges, grant option from 'user1'@'%';mysql revoke all privileges, grant option from 'user1'@'192.168.0.3'.