Install panel with external server mysql
Good, it's a question ....
Try installing the panel but to set the mysql connection, even if you set a different IP to use an external mysql server, the installer tries to do everything using localhost.
It is a bug or some my fault?
It is indeed a bug with the installer. The result is that the permissions get set incorrectly for the PufferPanel MySQL user.
You can "fix" this by hardcoding line 81 of the installer https://github.com/PufferPanel/PufferPanel/blob/master/pufferpanel#L81 to have the correct host. You should set this to the IP of the server that PufferPanel is running on, not the MySQL server.
On the remote MySQL server you may also have to set skip-name-resolve in the my.cnf in order to prevent it from trying to find the DNS name of the server and giving an error because it's not seeing it as the raw IP. http://www.vionblog.com/skip-name-resolve-to-speed-up-mysql-and-avoid-problems/
why the same IP of the panel and not the remote mysql server?
i dont understant.
Because permissions are set on users depending on where they are coming from, so to the MySQL user it sees the pufferpanel user as coming from the server PufferPanel is running on.
So to reiterate if you make newHost="220.127.116.11" replacing 18.104.22.168 with the IP of the PufferPanel sever it should work. Please let me know how it goes.
well finally test with a local mysql server..
with installer default but.. http://prntscr.com/b3nd61
Please grab the contents of /var/log/nginx/error.log and /var/log/nginx/access.log and paste them to http://paste.ee and give us the URL it takes you to.