In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Clone code
# cd / usr/local/src/
# git clone https://github.com/Meituan-Dianping/SQLAdvisor.git
two。 Install dependency packages
# yum install-y make cmake libaio-devel libffi-devel glib2 glib2-devel bison gcc gcc-c++
3. Compiling sqladvisor depends on perconaserverclient_r, so you need to install Percona-Server-shared-56. You may need to configure soft links such as:
# cd / usr/lib64/
# ln-s libperconaserverclient_r.so.18 libperconaserverclient_r.so
4. Install the percona56 yum source and install:
# wget http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm
# yum install percona-release-0.1-3.noarch.rpm-y
# yum install Percona-Server-shared-56-y
5. Compile sqladvisor's dependency sqlparser (source directory)
# cd / usr/local/src/SQLAdvisor/
# cmake-DBUILD_CONFIG=mysql_release-DCMAKE_BUILD_TYPE=debug-DCMAKE_INSTALL_PREFIX=/usr/local/sqlparser-DIGNORE_AIO_CHECK=/usr/share/doc/libaio-0.3.109. /
# make & & make install
6. Compile sqladvisor (source directory)
# cd. / sqladvisor/
# cmake-DCMAKE_BUILD_TYPE=debug. /
# make
7. Complete the test
# cp / usr/local/src/SQLAdvisor/sqladvisor/sqladvisor / usr/bin/sqladvisor
# sqladvisor-h 127.0.0.1-P 3306-u root-p '123456'-d test-Q "sql statement"-v 1
8. Simplify command
# vim / etc/sql.cnf
[sqladvisor]
Username=xxx
Password=xxx
Host=xxx
Port=xxx
Dbname=xxx
# sqladvisor-f / etc/sql.cnf-Q "sql statement"-v 1
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.