多个 MySQL 版本
我们有一个运行 Red Hat Enterprise 3 和 MySQL 3.23 的 Linux 服务器。 该服务器上有许多网站。
我们有一个新网站想要放置在使用 MySQL 4/5 的服务器上。 是否可以并行运行两个版本的 MySQL?
如果是这样,怎么办?
We have a Linux server running Red Hat Enterprise 3 and MySQL 3.23. This server has a number of websites on it.
We have a new website that we want to put on this server that uses MySQL 4/5. Is it possible to run the two versions of MySQL in parallel?
If so, how?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的你可以。 当然,服务器必须使用非标准端口号。
请参阅文档 http://dev.mysql.com /doc/refman/5.1/en/multiple-unix-servers.html
Yes you can. Of course on of the servers would have to use non-standard port number.
See the documentation http://dev.mysql.com/doc/refman/5.1/en/multiple-unix-servers.html
是的,这是可能的,但很棘手。
首先,最好不要使用 RedHat 提供的 RPMS - 它们会导致各种依赖性问题。
本质上,您需要做的就是构建两个版本,并将它们安装到完全不同的目录中。
然后,您需要确保它们配置有单独的:
实际上,可以通过创建两个
my.cnf
文件来完成,并确保它们是在守护程序启动脚本中的命令行参数中选择。另请注意,您需要非常小心可能构建的任何共享库,特别是当您在同一服务器上运行任何客户端应用程序时。
例如,如果您希望 Perl::DBD::mysql 运行,这会变得很糟糕,因为安排两个副本(每个副本都链接到不同版本的共享库)并不简单。
Yes, it's possible, but tricky.
Firstly, it's probably best not to use the RedHat supplied RPMS - they'll cause all sorts of dependency issues.
In essence, all you need to do is to build the two versions, and install them into completely different directories.
Then you need to make sure that they're configured with separate:
In practise that can be done my creating two
my.cnf
files, and making sure those are chosen in the command line parameters in the daemon start up scripts.Note also that you'll need to be very careful with any shared libraries that might get built, particularly if you're running any client applications on the same server.
This gets nasty if, for example, you want Perl::DBD::mysql running, as it's not simple to arrange for there to be two copies, with each linked against a different version of the shared libraries.