cyberpanel
cyberpanel copied to clipboard
Remote SQL, local IP
Hello.
When installing in the "Remote SQL" mode, the user 'cyberpanel'@'<IP>'
is created on the database server. And this IP is always external. When using a database inside the local network, this causes a problem: the structure and data are not created in the database, since the connection is established from a local address, but the user is created for an external address.
I see two solutions:
Manually specify the address from which connections will be established (let it be external by default) so that you can specify the local address
Create user 'cyberpanel' @ '%' which is not very secure but works.
I've tried to make PR, but my knowledge in python is very poor.
What I wanted to implement:
add new read condition in install/cyberpanel.sh:700
echo -e ""
printf "%s" "Which IP use to connect to mysql. (Internal or external. By default - external): "
read -r Remote_MySQL_IP
create new file machineIPinternal
in /etc/cyberpanel/
In this file write internal IP
In install/mysqlUtilities.py:41
add check,
if Remote_MySQL_IP = internal, than create db user with local ip, local IP take from /etc/cyberpanel/machineIPinternal
I have the same issue, poor features "Remote Database" Just make features but they even don't test it....