In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
# create
Mkdir / company abbreviation / mysql
# stop database service
Systemctl status mariadb.servicesystemctl stop mariadb.service
# move database files to a new storage location
Cp-rp / var/lib/mysql/ / Company abbreviation / mysql/
# modified database configuration file
[root@iZkdZ ~] # cat / etc/ my.cnf [mysqld] datadir=/ acronym / mysqlsocket=/ acronym / mysql/mysql.socklower_case_table_names = Disabling symbolic-links is recommended to prevent assorted security riskssymbolic-links=0# Settings user and group are ignored when systemd is used.# If you need to run mysqld under a different user or group # customize your systemd unit file for mariadb according to the# instructions in http://fedoraproject.org/wiki/Systemd[mysqld_safe]log-error=/var/log/mariadb/mariadb.logpid-file=/var/run/mariadb/mariadb.pid## include all files from the config directory#!includedir / etc/my.cnf.d
# start the database
Systemctl start mariadb.service systemctl status mariadb.service
# New command to log in to the database, you need to specify mysql.sock
Mysql-uzabbix-p123456-S / Company acronym / mysql/mysql.sock
# create a soft link, otherwise the zabbix page cannot be opened
Mkdir / var/lib/mysqlln-s / company abbreviation / mysql/mysql.sock / var/lib/mysql/mysql.sock
Before this step, I renamed the original / var/lib/mysql directory to / var/lib/mysql_ori. So, there will be a command to create / var/lib/mysql. Confirm below that there is no problem with restarting the zabbix server, and the web interface can be opened normally. I just moved the original / var/lib/mysql directory to the / tmp directory, and then to the company's default directory for backup.
# restart zabbix
Systemctl restart zabbix-server.service
Reference:
Http://www.cnblogs.com/seasonsstory/archive/2013/07/24/3209785.html--zabbix cannot connect to the database
Http://blog.chinaunix.net/uid-20749043-id-1878317.html-- change mysql storage path
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.