Creating MySQL Cluster Tables (4.1)

To create the necessary tables in the database:


  1. Connect to the MySQL client as described in the MySQL documentation https://dev.mysql.com/doc/mysql-cluster-excerpt/8.1/en/, for example:

    $ mysql -u root -p <password> -h <IP address to the MySQL Server>

     

  2. Show existing databases:

    mysql> show databases;

    The current databases should be displayed.
     

  3. Create the PCC database:

    mysql> create database pcc;

    The PCC database should now be created.
     

  4. Connect to the database:

    mysql> use pcc;

    The database should now be changed to pcc.
     

  5. Create the bucket_storage table by executing the following sql statement:

    CREATE TABLE bucket_storage (
    	id bigint NOT NULL PRIMARY KEY,
    	bucketinfo varbinary(13900) NOT NULL
    ) ENGINE=ndbcluster DEFAULT CHARSET=latin1 MAX_ROWS=1000000000;

     

  6. Create the config_storage table by executing the following sql statement:

    CREATE TABLE config_storage (
    	name varbinary(255) NOT NULL,
    	item int NOT NULL,
    	data varbinary(13700) DEFAULT NULL,
    	PRIMARY KEY using hash(name,item)
    ) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
  7. Verify that the tables have been created:

    mysql> describe bucket_storage;
    mysql> describe config_storage;

    Â