Installing MySQL on a VPS server and connecting from other servers

喜夏-厌秋 提交于 2019-12-11 10:27:45

问题


I have few VPS servers and few Cloud servers across the globe (West US, South Us, Europe, China) and users are redirected to the nearest server with DNS IP Geolocation. My servers currently serve static content but I am changing my app so I am in need of a database, particularly MySQL.

At first I was going to use Amazon RDS but I found out that installing my own MySQL on a VPS it will end up cheaper ($72 dollars for a small instance VS $40 dollars of a Linode 1024)

So I bought a linode VPS in London and I installed MySQL and Phpmyadmin onto my VPS and within Phpmyadmin my user is root@localhost thus I cannot connect to my database from my other servers.

Server version: 5.0.51a-24+lenny5
Protocol version: 10
Server: Localhost via UNIX socket
User: root@localhost

What I'm I missing here? How can I make this MySQL database accessed globaly?

All my cloud/VPS servers are Debian 5.0.


回答1:


You want to enable remote connections.

Most specifically, you'll have to add a MySQL user with the appropriate permissions for your database for each IP that needs to connect.

The linked article shows all the steps you'll have to perform.



来源:https://stackoverflow.com/questions/9609053/installing-mysql-on-a-vps-server-and-connecting-from-other-servers

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!