In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly gives you a brief introduction to the process of migration and installation of mysql database installation path. You can check the relevant professional terms on the Internet or find some related books to supplement them. We will not dabble here. Let's go straight to the topic of migration and installation of mysql database installation path. I hope we can bring you some practical help.
System: centos7.3
Database: mysql5.7
Stop the business before migrating the mysql database installation path.
I. stop the database service
Systemctl stop mysqld
Second, check the storage of the server
Df-h
Enter the default installation directory of the database
Cd / var/lib/mysql
4. Check the file size under the default path of mysql
Du-h-max-depth=1 / var/lib/mysql
Copy / var/lib/mysql to / data directory
Cp-a / var/lib/mysql / data/
6. Enter the / etc directory and back up my.cnf
Cd / etc/
Cp my.cnf my.cnf-bak
7. Edit my.cnf and change the datadir and socket values to the new path
Vi my.cnf
VIII. Stop database service
Systemctl stop mysqld
IX. Start database service
Systemctl start mysqld
Log in to the database to verify the success of the migration
Attached:
Temporarily restart the database service
/ usr/sbin/setenforce 0
Change it to SELINUX=disabled to successfully restart the database service at any time
Vi / etc/selinux/config
Migration installation mysql database installation path process brief analysis will first tell you here, for other related issues you want to know can continue to pay attention to our industry information. Our section will capture some industry news and professional knowledge to share with you every day.
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.