NDB node Configuration
1. Create a database for Ldirector
Now, let's create the Ldirectordb database and give the database permissions to ldirector users. Ldirector will use the database to check the running state of the two database nodes.
On the mysql-data1.mytest.com, create the database:
$ mysql-u Root-p
In the MySQL command line interface, enter the following command:
Mysql> GRANT all on ldirectordb.* to ' ldirector ' @ '% ' identified by ' LDIRECTORPASSW Ord ';
mysql> FLUSH privileges;
mysql> CREATE DATABASE Ldirectordb;
mysql> use Ldirectordb;
Mysql> CREATE TABLE Connectioncheck (Status INT) Engine=ndbcluster;
Mysql> INSERT into Connectioncheck () VALUES (1);
Mysql> quit
Then, the database is created on the mysql-data2.mytest.com, and the data is automatically copied from the Mysql-data1:
$ mysql-u Root-p
In the MySQL command line interface, enter the following command:
Mysql> GRANT all on ldirectordb.* to ' ldirector ' @ '% ' identified by ' LDIRECTORPASSW Ord ';
mysql> FLUSH privileges;
mysql> CREATE DATABASE Ldirectordb;
Mysql> quit