集群 Mysql 问题 [关闭]

问题描述 投票:0回答:0

我正在按照以下教程创建 MySQL 多节点:

https://cloudinfrastructureservices.co.uk/how-to-create-a-multi-node-mysql-cluster-on-ubuntu-20-04/

一切顺利,直到我进入第 3 步:安装和配置 MySQL 服务器。当我安装所有东西并重新启动 mysql 时,出现以下错误:

Job for mysql.service failed because the service did not take the steps required by its unit configuration.

当我尝试登录 MySQL (mysql -u root -p) 时,出现以下错误:

Can't connect to local MySQL server through socket 'var/run/mysqld/mysqld.sock' (2)

我查看了系统日志,但不确定可能是什么错误。我查看了集群配置,原则上一切正常。当我将以下行放入 /etc/mysql/my.cnf 时出现错误:

[mysqld]
ndbcluster                     

[mysql_cluster]
ndb-connectstring=192.168.10.2 (this is the IP address of the management computer)

当我重新建立服务时,出现错误。

mysql cluster-computing ubuntu-20.04 mysql-cluster
© www.soinside.com 2019 - 2024. All rights reserved.