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!

migrated from stackoverflow.com Oct 29 '11 at 12:19

This question came from our site for professional and enthusiast programmers.

  • belongs on dba. – Daniel A. White Oct 28 '11 at 23:42
  • How did you create the table? Which data files were created? – johannes Oct 28 '11 at 23:46
  • create table: create database world; data files created: City.frm, City.ndb (empty) and db.opt – Girish Rao Oct 28 '11 at 23:53
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.