简体   繁体   English

帮助为Rails设置单独的MySQL服务器

[英]Help setting up separate MySQL server for rails

Maybe I am over complicating this in my head but I just don't know what to do next... 也许我已经把这个复杂化了,但我只是不知道下一步该怎么做...

I have a slice configured with MySQL, Rails & Passenger. 我有一个配置有MySQL,Rails和Passenger的切片。 I am setting up a new slice to separate the front-end from the database. 我正在设置一个新的切片,以将前端与数据库分开。 The current server will become the database server and the new front-end will connect to it. 当前服务器将成为数据库服务器,新的前端将连接到该服务器。 I am using Ubuntu 8.10 on both. 我在两者上都使用Ubuntu 8.10。

Can someone point me to a resource that will help me configure this properly? 有人可以指出我可以帮助我正确配置此资源的资源吗? I have never had to separate things out like this before but we are now thinking about scalability and this seems like an obvious first step. 我以前从来没有像现在这样将事情分开,但是我们现在正在考虑可伸缩性,这似乎是显而易见的第一步。

What are the best resources for helping me through setting up separate database and front-end hosts? 什么是最好的资源,可以帮助我设置单独的数据库和前端主机?

I'm no expert but I think this really boils down to configuring mysql to allow access from hosts other than localhost. 我不是专家,但我认为这实际上归结为将mysql配置为允许从本地主机以外的主机进行访问

Secondly, you will have to change your database.yml to use tcp/ip to connect to mysql rather than a unix socket. 其次,您将必须更改您的database.yml以使用tcp / ip连接到mysql而不是unix套接字。 Delete the 'socket:' line (or comment it out), and replace it with 删除“ socket:”行(或将其注释掉),并替换为

host: <ip of mysql server>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM