2

I have setup MySQL Cluster with the MySQL server node and the Management node on a single server, and 2 data nodes (each on a different server for 3 servers in all). After installing, I run ndb_mgm and run SHOW at the prompt and everything seems to look OK, with the following headers.

[ndbd(NDB)] 2 node(s)
[ndb_mgmd(MGM)] 1 node(s)
[mysqld(API)] 1 node(s)

When I run mysql -uroot on the mysql server and create a database and populate a table with data I notice that the database directory and table files are being created in the local datadir, not the datadir on my Cluster's data nodes.

I have set /var/lib/mysql-cluster/config.ini to point at the data nodes and their datadir. The /etc/my.cnf file looks like this on all 3 servers. I have hidden the DNS, both are the same

[mysqld]
# Options for mysqld process:
ndbcluster # run NDB storage engine
ndb-connectstring=domU-xx-xx-xx-xx-xx-xx #location of management server
[mysql_cluster]
# Options for ndbd process:
ndb-connectstring=domU-xx-xx-xx-xx-xx-xx #location of management server

Why is the mysql table data files being stored locally? Shouldn't the data files (.ndb and .frm files) be on the data nodes only?

Thanks!

asked Oct 28, 2011 at 23:41
3
  • belongs on dba. Commented Oct 28, 2011 at 23:42
  • How did you create the table? Which data files were created? Commented Oct 28, 2011 at 23:46
  • create table: create database world; data files created: City.frm, City.ndb (empty) and db.opt Commented Oct 28, 2011 at 23:53

1 Answer 1

3

everything is in order!

The data nodes don't have individual files for each table and so you won't see the table names there. What you're seeing with the MySQL Server directories is not the files containing the contents of the tables but a copy of the data dictionary/schema definitions for those tables (e.g. if you add more rows to these tables then the files you see with the data nodes should increase in size but the ones with the MySQL Servers should not).

Regards, Andrew.

answered Nov 2, 2011 at 19:31

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.