Ubuntu: installation and configuration of storage nodes (NDB)

Source: Internet
Author: User
This section describes how to install, configure mysql-data1.mytest.com, and mysql-data2.mytest.com In Ubuntu. Install MySQL on both the mysql-data1 and mysql-data2 servers, respectively when installing the MySQL server: $ sudoapt-getupdateinstallmysql-server installation, the installer will require you to set the MySQL root Password. Set

This section describes how to install, configure mysql-data1.mytest.com, and mysql-data2.mytest.com In Ubuntu.

Install MySQL

Install the MySQL server on both the mysql-data1 and the mysql-data2:

$ Sudo apt-get update install mysql-server

During installation, the installer requires you to set the MySQL root Password. Set and remember the password.

After the program is installed, stop the MySQL service:

$ Sudo/etc/init. d/mysql stop

Configure my. cnf

On both the mysql-data1 and mysql-data2 servers, perform the same action.

First, back up the original/etc/mysql/my. cnf:

$ Sudo mv/etc/mysql/my. cnf/etc/mysql/my. cnf-back

Then, edit a new my. cnf:

$ Sudo nano/etc/mysql/my. cnf

The content is as follows:

[Client]

Socket =/var/run/mysqld. sock

Port = 3306

[Mysqld]

Ndbcluster

Ndb-connectstring = 192.168.1.10 # IP address of the Management Node

Default-storage-engine = NDBCLUSTER

[Mysql_cluster]

Ndb-connectstring = 192.168.1.10 # IP address of the Management Node

After the file is saved, you can start the ndb service:

$ Sudo/etc/init. d/mysql-ndb start-initial

When you are prompted to start the ndb service, use/etc/init. d/mysql-ndb start. In the following cases, use/etc/init. d/mysql-ndb start-initial ("initialization" to start ):

Enable the ndb service for the first time;

After the configuration of the Management node is changed.

If you encounter the following errors when starting the ndb service:

* Starting MySQL NDB Data Node ndbd error = 2350

22:20:55 [ndbd] INFO -- Error handler restarting system

22:20:55 [ndbd] INFO -- Error handler shutdown completed-exiting

Sphase = 0

Exit =-1

The ndb service has been started. Run the following command to check whether the ndb service has been started:

$ Ps aux | grep ndb | grep-v grep

Now you can start the mysql service:

$ Sudo/etc/init. d/mysql start

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.