Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have my management node and sql node on the same server, and 2 data nodes (3 machines in total). Do I need to run ./mysqld --ndb-cluster (or /etc/init.d/mysql-server start) on 1) the data nodes, or 2) on the sql node, or 3) on both?

I am following this which doesn't seem to specify. http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-install-first-start.html

Thanks.

share|improve this question
    
The answer to this thread provides more on where files are located: dba.stackexchange.com/questions/7385/… –  Mat Keep Nov 2 '11 at 20:08
add comment

1 Answer

There are three types of nodes

  • SQL
  • Storage (Data)
  • Management

According to MySQL Clustering, page 7 paragraphs 3,4 say:

Storage Nodes

Stroage nodes store the fragments of data that make up the tables held in a cluster and the early work in processing queries. Storage nodes require a large amount of RAM and relatively high-performance machines. The bulk of the processing is done on the storage nodes., and these are the nodes that an administrator spends most of his or her time tweaking. They are completetly controlled the the management node via the configuration file and management client.

SQL Nodes

SQL nodes, which run on standard MySQL servers, are the nodes that applications can connect to, In small simple clsuters, these nodes are often run on the same physical servers as the storage nodes. Essentially, SQL nodes provides the "face" to the cluster and operate exactly as standard MySQL servers. They then connect to the storage nodes behind, which do the early processing on the queries and return the results for final processing at the SQL nodes. The amount of processing done on the SQL and storage nodes changes form query to query.

Based on this, you could run mysqld on a Storage Node if the dataset is small. You are not obligated to do so. It is preferable if you had a separate Storage Node and a separate SQL node. If you have separate Storage and SQL nodes, then do not run mysqld on the Storage Node.

share|improve this answer
    
Thanks. This is my current setup - storage nodes are physically separate from the SQL node. I run /etc/init.d/mysql-server start on the SQL node but it ends up using local storage to store the data. I guess I will try running ./mysqld with the -ndb-cluster option –  Girish Rao Oct 31 '11 at 20:07
    
BTW I am SCMDBA not SCMCDBA. I am not cluster certified. I have limitations. I hope my answers help. –  RolandoMySQLDBA Oct 31 '11 at 20:10
    
It answers part of my question. Should I be seeing the MySQL database and table data stored in my datadir on my datanodes? Right now the data appears only in the datadir of my MySQL node, so something doesn't seem right. –  Girish Rao Oct 31 '11 at 22:43
    
You need to add engine=ndb; to your create table statements to have them stored in the cluster. e.g.CREATE TABLE t1 (a int primary key, b int) engine=ndb; The data itself is stored by the data nodes. The data nodes datadir looks quite different to the MySQL datadir, and it's not really possible to identify files belonging to individual tables. The MySQL nodes store a .frm file and an almost empty .ndb file for each table, but do not store any data. –  Frazer Clement Jan 10 '12 at 18:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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