MySQL 集群经理兼 NDB/J

发布于 2024-11-13 22:18:37 字数 520 浏览 0 评论 0原文

几天来,我一直在尝试在 3 个 Ubuntu 节点(3 个相同的 VM 实例,每个实例具有 1GB RAM)上使用 MySQL Cluster Manager 设置 MySQL 集群。

我观看了 MySQL 网站上有关 MySQL Cluster Manager 的视频。关于它没有太多其他文档/教程(可能因为它是商业产品)。

我启动集群并显示状态,但 mysqld 节点从未启动,它们只是保持“已添加”状态。如果我使用“sudo apt-get install mysql-server”安装 mysql-server,那么我会正常运行本地服务器,并且节点注册为“已启动”,但我看不到如何连接到集群而不是单个节点MySQL 服务器在 mysqld 节点上运行。

我也对 MySQL Cluster 的 Java 连接器是如何组织的感到困惑,似乎有多个库,所以我什至不知道我需要哪个库或如何获取它们(有些库是在编译 MySQL Cluster 时创建的) ???)。有人可以解释一下连接器如何从 Java 与 NDB 交互以及如何获取它们吗?

感谢您的任何答复。

I've been trying to setup a MySQL Cluster for a few days using the MySQL Cluster Manager on 3 Ubuntu nodes (3 identical VM instances with 1GB RAM each).

I've followed the video on MySQL Cluster Manager on the MySQL site. There's not much other documentation/tutorials on it (probably because it's a commercial product).

I start the cluster and show the status, but the mysqld nodes never start, they just remain as "added". If I install mysql-server using "sudo apt-get install mysql-server" then I get the normal local server running and the nodes register as "started", but I can't see how to connect to the cluster rather than the individual MySQL servers running on the mysqld nodes.

I'm also at a loss as to how the Java connector for MySQL Cluster is organised, it appears that there are multiple libraries so I don't even know which library I need or how to get them (some are created when compiling MySQL Cluster???). Could someone please explain how the connectors work to interact with NDB from Java and how to get them?

Thanks for any answers.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我的黑色迷你裙 2024-11-20 22:18:37

首先,可以通过导航到 dev.mysql.com 上的集群文档(称为“MySQL Cluster Manager”)找到 MySQL Cluster Manager 的官方文档。尽管 MySQL Cluster 本身可以在商业或 GPL 许可下使用,但 MySQL Cluster Manager 是商业软件,这一点是正确的。

听起来好像您已经配置了代理并让它们运行,因此如果您想快速启动并运行集群,请参阅此 使用 MySQL Cluster Manager 的简单示例

在理解 MySQL 服务器(mysqlds)未启动的原因方面,有您的问题中没有太多线索,因此我们需要缩小范围(原因之一可能是您在同一主机上定义了多个试图使用默认端口(3306)的 mysqld)。

要检查管理器在做什么,请查看名为 mysql-cluster-manager.log 的文件。您可以使用集群管理器配置文件调整日志记录级别。

要查看 MySQL 集群本身认为发生了什么,请检查存储集群数据文件的目录(如果您没有覆盖默认值,那么该目录将位于 /clusters/ 下,然后您将在簇)。第一个要检查的是 ndb__cluster.log 以及您可以在与 ndb_mgmd 节点关联的 id 的“data”子目录中找到的其他日志。还会有每个节点的日志文件,因此还要检查存储在与 mysqld 节点 ID 关联的数据目录中的 mysqld_out.err 和 mysqld_out.log 文件。

最重要的一点是不要使用通过“sudo apt-get install mysql-server”安装的 mysqld,因为该版本与 MySQL Cluster 不兼容 - 始终使用 MySQL 附带的二进制文件集群 tar 球(或者如果使用集群管理器,无论如何它对您来说应该是透明的。

请注意,如果您想在没有 MySQL 集群管理器的情况下在单个主机上启动并运行 MySQL 集群,请参阅位于 MySQL 集群上的快速入门指南下载站点(在 mysql.com 而不是 e-Delivery)

对于 java 访问,请尝试这个 MySQL Cluster ClusterJ 教程

First of all, the official documentation for MySQL Cluster Manager can be found by navigating to the Cluster documentation on dev.mysql.com (called "MySQL Cluster Manager"). You are correct that MySQL Cluster Manager is commercial software although MySQL Cluster itself is available under a commercial or GPL license.

It sounds as though you've already configured the agents and have them running and so if you want to get a Cluster up and running quickly then refer to this simple worked example of using MySQL Cluster Manager

In terms of understanding why the MySQL Servers (mysqlds) are not starting up, there aren't many clues in your question and so we need to narrow it down (one reason could be if you had multiple mysqlds defined on the same host that are trying to use the default port (3306)).

To check what the manager has been doing, take a look in the file called mysql-cluster-manager.log. You can adjust the level of logging using the cluster manager configuration file.

To see what MySQL Cluster itself thinks has happened, check the directories storing the cluster data files (if you haven't over-written the defaults then this would be under /clusters/ and then you'll see a directory for each node in the cluster). The first one to check is ndb__cluster.log and other logs that you'll find in the "data" sub-directory of the id associated with the ndb_mgmd node. There will also be per-node log files so also check the mysqld_out.err and mysqld_out.log files stored in the data directory associated with mysqld node-ids.

Most important point is do not use the mysqld that gets installed with "sudo apt-get install mysql-server" as this version will not be compatible with MySQL Cluster - always use the binaries that come with the MySQL Cluster tar ball (or if using Cluster Manager that should be transparent to you anyway.

Note that if you want to get MySQL Cluster up and running on a single host without MySQL Cluster Manager then refer to the quick-start guide located on the MySQL Cluster download site (on mysql.com rather than e-Delivery).

For the java access, try out this MySQL Cluster ClusterJ tutorial.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文