我有两个服务器abc.com
和xyz.com
。在abc.com
我创建了一个数据库。我想在xyz.com
中访问此数据库。
我在123.123.123.123
上创建了远程主机abc.com
。但不知道下一步。
提前致谢
答案 0 :(得分:0)
我认为您应首先阅读有关为cPanel / WHM服务器配置远程mysql服务器的cPanel / WHM文档: https://documentation.cpanel.net/display/ALD/Remote+MySQL
As a basic guideline the steps would be as follow:
- create a mysql database in a cPanel's user account
- create a mysql username and password for that database
- grant rights to that user for that database
- add the ip address of the mysql remote host you want to use
- check your server firewall and be sure that you grant access to mysql (tcp port 3306) to that ip address;
- from the remote host try doing a **telnet cpanel-server-ip 3306** and see if you can connect