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--
Free to bored, conveniently practice for a long time did not touch MYSQL, so decided to compile the source code installation MYSQL-5.7.11, practice not tight, out of a lot of problems, so quickly summarized here:
First download compiler: cmake-2.8.12.2-4.el6.x86_64.rpm MYSQL source package: mysql-boost-5.7.11.tar.gz
Next, configure, compile and install the trilogy: (The difference is that I put the data directory on a separate virtual hard disk-DMYSQL_DATADIR=/mydata/data -DMYSQL_UNIX_DATA=/mydata/data/mysql.sock to separate the data and installation paths, and the socket directory is also defined on the data directory)
The first problem: the virtual machine to the memory is not enough (850M), the compilation was particularly slow, basically compiled to 70% when it will not pass, so the solution is to increase the memory to 3000M, while adding a CPU to the virtual machine to speed up the compilation.
The second question: I thought this would be able to compile smoothly, but when compiling, there is still no past, and the consistency card is at 70%. Why? Little buddy door, can you guess why?
The answer is: My disk memory is not enough, run out, use df -h to view, I go, the disk has burst, so the next hurry to stretch the disk, directly pull to 15G is almost, when stretching note is that when the lv is expanded to 15G, be sure to remember to expand the file system (resize2fs /dev/Vogroup/lv_root), otherwise the file system still does not get the purpose of stretching.
Third question: So I waited quietly for the installation to succeed, um, finally it did succeed. Haha, then create mysql users and mysql user groups, and change all files in/usr/local/mysql to mysql.mysdl users and groups, and then initialize mysql database, so that mysql database is established, used to store metadata of mysql database, just like file system metadata stored in metadata area (innode), and information_schema database is used to store some data generated during database operation.
At the end of initialization, the file in the data directory/mydata/data is changed to chown mysql.mysql . -R All changed to mysql users and groups. So finally start the data server (/etc/init.d/mysqld start(the previous environment variables have been changed, and the startup scripts mysql.server and my.cnf have been copied from supports-file to/etc/init.d/mysqld and/etc/my.cnf respectively)). The service is started, but the problem appears:
Error: Can't connect to local MySQL server through socket '/mydata/data' (111)
This question puzzles me for nearly half an hour, so all kinds of Baidu A, at the moment I miss Google A, the emperor no longer has a heart, I still find the answer;
The question is: I did not define socket addresses for [mysqld] and [client] in the main configuration file, and mysql default address is/var/lib/mysql, so quickly:[client] socket= /mydata/data/mysql.sock [mysqld] socket= /mydata/data/mysql.sock restart mysqld server again, at this time in/mydata/there are sockets generated, and can also connect to mysqld main server through local mysql client.
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.