Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure MySQL cluster in ubuntu9.0

2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article is about how to configure MySQL clusters in ubuntu9.0. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article. Let's take a look at it.

Test environment:

Server1: ndbd 192.168.245.11

Server2: ndbd 192.168.245.12

Server3: mysqld-ndb-cluster 192.168.245.13

Ndbd: node.

D-ndb-cluster: the MySQL server node, and the program accesses the IP of this machine directly. The default port is still 3306.

Ndbd_mgm ndbd_mgmd: manage the node. Manage / view the status of each library node and server node.

II. Cluster scheme

1. Management node: server3 (192.168.245.13)

two。 Storage node: server1 (192.168.245.11), server2 (192.168.245.12)

3.SQL node: server1 (192.168.245.11), server2 (192.168.245.12), server3 (192.168.245.13)

III. Installation and configuration of mysql

1. Installation, sudo apt-get install mysql-server

two。 Configure my.cnf on these three servers, all of which need to be configured

Vim / etc/mysql/my.cnf

-- my.cnf starts--

Ubuntu@ubuntu:~$ cat / etc/mysql/my.cnf

#

# The MySQL database server configuration file.

#

# You can copy this to one of:

#-"/ etc/mysql/my.cnf" to set global options

#-"~ / .my.cnf" to set user-specific options.

#

# One can use all long options that the program supports.

# Run program with-help to get a list of available options and with

#-print-defaults to see which it would actually understand and use.

#

# For explanations see # http://dev.mysql.com/doc/mysql/en/serve... Ables.html

# This will be passed to all mysql clients

# It has been reported that passwords should be enclosed with ticks/quotes

# escpecially if they contain "#" chars...

# Remember to edit / etc/mysql/debian.cnf when changing the socket location. [client] port = 3306 socket = / var/run/mysqld/mysqld.sock

# Here is entries for some specific programs

# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed. [mysqld_safe] socket = / var/run/mysqld/mysqld.sock nice = 0 [mysqld]

#

# * Basic Settings

#

#

# * IMPORTANT

# If you make changes to these settings and your system uses apparmor, you may

# also need to also adjust / etc/apparmor.d/usr.sbin.mysqld.

# user = mysql pid-file = / var/run/mysqld/mysqld.pid socket = / var/run/mysqld/mysqld.sock port = 3306 basedir = / usr datadir = / var/lib/mysql tmpdir = / tmp language = / usr/share/mysql/english skip-external-locking

#

# Instead of skip-networking the default is now to listen only on

# localhost which is more compatible and is not less secure.

# bind-address = 127.0.0.1

#

# * Fine Tuning

# key_buffer = 16m max_allowed_packet = 16m thread_stack = 128K thread_cache_size = 8

# max_connections = 100 # table_cache = 64 # thread_concurrency = 10

#

# * Query Cache Configuration

# query_cache_limit = 1m query_cache_size =

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report