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

Construction steps of PROXYSQL

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the relevant knowledge of "the steps of building PROXYSQL". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

1 download the RPM installation package from https://github.com/sysown/proxysql/releases first

2 temporarily please download 1.4.12 this version has been running in the test library for 2 months and has not caused any problems so far

3 put the RPM package directly into the middleware server and execute

Yum ­y install proxysql ­1.4.12 ­1 ­centos7.x86_64.rpm

Related dependent packages, should be able to install directly

4 Please install the MYSQL client, there is no need to install the MYSQL server program, the client can be installed from the official website, or PERCONA

You can install the official website or Mariadb download client. If you don't install the MYSQL client, you can't do it under SHELL.

PROXYSQL configuration

5 start PROXYSQL SERVICE START

View PROXYSQL SERVER STATUS

6 log in to PROXYSQL for the first time

Mysql ­u admin ­padmin ­h 127.0.0.1 ­P6032-prompt='Admin >'

7 there are two ways to configure PROXYSQL, 1 is managed through the management interface, 2 has been configured with a configuration file, here

It is recommended to use the management port for configuration, because the configuration file can only be used for basic configuration, and the PROXYSQL itself carries

SQLLITE database, the configuration file is discarded after the initial configuration, and all configuration data is written to the SQLLITE database.

8 although the client of MYSQL is used, and some commands can be used to control SQLLITE, it is packaged in the upper layer and the lower layer.

Still use some of the SQLLITE commands, so some MYSQL commands cannot be executed after typing, please know

9 We add our MGR MYSQL machines to the replication group

INSERT INTO mysql_servers (hostgroup_id,hostname,port) VALUES (1meme 10.5.1.117mr.3306)

INSERT INTO mysql_servers (hostgroup_id,hostname,port) VALUES (1meme 10.5.1.118pr 3306)

INSERT INTO mysql_servers (hostgroup_id,hostname,port) VALUES (1meme 10.5.1.119mr.3306)

INSERT INTO mysql_servers (hostgroup_id,hostname,port) VALUES (2meme 10.5.1.117mr.3306)

INSERT INTO mysql_servers (hostgroup_id,hostname,port) VALUES (2meme 10.5.1.118mr.3306)

INSERT INTO mysql_servers (hostgroup_id,hostname,port) VALUES (2meme 10.5.1.119mr.3306)

10 insert a monitoring account

Please first establish the relevant monitoring account in the relevant MGR group, and update the relevant account in the PROXYSQL

UPDATE global_variables SET variable_value='monitor' WHERE variable_name='monitor' coach

UPDATE global_variables SET variable_value='1234.Com' WHERE variable_name='mysql ­- monitor_password' customers

11 configure the interval for PROXYSQL monitoring

UPDATE global_variables SET variable_value='2000' WHERE variable_name IN ('mysql ­- monitor_connect_interval',' mysqlflowers monitor _ ping_interval','mysql ­- monitor_read_only_interval')

And add the machine to the read-write group

12 insert MYSQL_USERS. Here, you need to configure it in MYSQL and set up relevant accounts.

13 add the configuration to the system and save to the hard drive

Load mysql variables to runtime

Save mysql variables to disk

Load mysql variables to runtime

Save mysql variables to disk

14 verify that the cluster of MYSQL can be accessed directly through port 6033, and the IP address is the address of PROXYSQL

15 by far the simplest installation and debugging of PROXYSQL has been completed

This is the end of the content of "the steps to build PROXYSQL". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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

Internet Technology

Wechat

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

12
Report