Author Topic: User access from specific IP  (Read 8076 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
User access from specific IP
« on: September 18, 2018, 02:54:12 PM »
When creating a new user, you can only choose form [%] or [localhost].

Can a user be created that can only access SQL through a specific host / IP.

I can see the users in MYSQL - DB / USER (logged in as root on phpMyAdmin), however when I change the 'host' field of a newly created user into something else like a hostname ot IP address, the user doesn't show up in the MYSQL Manager in CWP.

Offline
*
Re: User access from specific IP
« Reply #1 on: September 28, 2018, 05:11:41 PM »
I've been successful at changing the IP to address a single IP.

The steps are, create a new user that has locahost access (NOT %).  Then enter the phpMyAdmin as the root user.  Go to the MYSQL - DB table, find the user and click on the localhost field to edit and replace it with the IP.  Do the same for the MYSQL - USER table.  If you edit the record (not just click on the localhost field) it changes other fields that have default values and it wont work.

After, restart MYSQL from the CWP Panel.  Your user should be updated with the correct IP address (instead of localhost) and access to the created database will only have have access for localhost (if setup) and from the user at IP address specified.

Offline
*
Re: User access from specific IP
« Reply #2 on: October 04, 2018, 10:38:19 AM »
Thanks for the heads up. Have also opened port 3306

While trying to install a new program on host yy.yy.yy.yy using the db at xx.xx.xx.xx I get this message:

Database server at xx.xx.xx.xx:3306 using database xxx_name as user xxx_name was not authenticated or could not be connected. Check config.php

my.cnf at xx server is empty
port 3306 is showing some mysqld activity from foreign address
IP is allowed/whitelisted
« Last Edit: October 04, 2018, 11:19:30 AM by Imago »