In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Today, Xiaobian shares with you the detailed method of mysql database directory migration under linux, which many people don't know very well. In order to let you know more about the method of mysql database directory migration under linux, Xiaobian summarized the following contents and looked down together. I'm sure you'll get something.
1. View the mysql installation directory
View the installation directory from the directory etc/my.cnf
2. Enter the mysql directory and stop the mysql service
Cd usr/local/mysqlservice mysql stop
(.)
3. Move the entire mysql directory
Cp-rf / usr/local/mysql/ home/mysql
4. Modify the mysql location in the my.cnf file and save it
[client] default-character-set=utf8 [mysqld] character-set-server=utf8 datadir=/home/mysql/data basedir=/home/mysql socket=/home/mysql/tmp/mysql.sock lower_case_table_names=1 [mysqld_safe] log-error=/home/mysql/log/mysqld.log
5. Restart the service:
Cd usr/local/mysqlservice mysql start
Encountered the following problems:
Starting MySQL.The server quit without updating PID file (/ home/local/mysql/data/localhost.localdomain.pid).
The solution is as follows:
Modify the permissions of the / home/local/mysql/data directory with the following command:
Chown-R mysql.mysql / home/local/mysql/data
The detailed method of mysql database directory migration under linux is shared here, of course, not only the above and everyone's analysis methods, but the editor can ensure its accuracy is absolutely no problem. I hope that the above content can have a certain reference value for everyone, and can be put into practice. If you like this article, you might as well share it for more people to see.
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.