Answer the question
In order to leave comments, you need to log in
How to allow connection to the database from a specific host in openserver?
I want to make it possible to open a site that distributes OpenServer on my router's local network. To do this, I changed the server in the OpenServer settings and made an alias from this ip-address to the site itself. I changed the database server in the site's config, but the site still can't connect to the database. When I try to login to phpmyadmin I get an error
mysqli::real_connect(): (HY000/1130): Host 'hikers' is not allowed to connect to this MySQL server
Answer the question
In order to leave comments, you need to log in
if the base is on the same host as the site, then connect to localhost/127.0.0.1, otherwise - specify the ip address of the host with the base
In PhpMyAdmin, you can create a user with a specific host through the interface.
Or via SQL
CREATE USER 'remoteUser'@'192.168.0.110' IDENTIFIED BY 'my_cool_remote_password'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question