How To Set Up A Load-Balanced MySQL Cluster - Page 2
3 Set Up The MySQL Cluster Nodes (Storage Nodes)Now we install mysql-max-5.0.19 on both sql1.example.com and sql2.example.com: sql1.example.com / sql2.example.com: groupadd mysql Then we create the MySQL configuration file /etc/my.cnf on both nodes: sql1.example.com / sql2.example.com: vi /etc/my.cnf
Make sure you fill in the correct IP address of the MySQL cluster management server. Next we create the data directories and start the MySQL server on both cluster nodes: sql1.example.com / sql2.example.com: mkdir /var/lib/mysql-cluster (Please note: we have to run ndbd --initial only when the start MySQL for the first time, and if /var/lib/mysql-cluster/config.ini on loadb1.example.com changes.) Now is a good time to set a password for the MySQL root user: sql1.example.com / sql2.example.com: mysqladmin -u root password yourrootsqlpassword We want to start the cluster nodes at boot time, so we create an ndbd init script and the appropriate system startup links: sql1.example.com / sql2.example.com: echo 'ndbd' > /etc/init.d/ndbd
|



Recent comments
17 hours 52 min ago
19 hours 2 min ago
20 hours 55 min ago
21 hours 54 min ago
22 hours 9 min ago
1 day 1 hour ago
1 day 3 hours ago
1 day 4 hours ago
1 day 18 hours ago
2 days 10 hours ago