In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "how to use binary package to install MySQL". In daily operation, I believe many people have doubts about how to use binary package to install MySQL. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubt of "how to use binary package to install MySQL". Next, please follow the editor to study!
Important tips:
MySQL needs to install libaio,5.7.19 version and libnuma in the future
1 decompress MySQL to the specified path, and this step will create the following directory structure:
Refer to the decompression instructions:
Gunzip
< /path/to/mysql-VERSION-OS.tar.gz | tar xvf - Table 2.3 MySQL Installation Layout for Generic Unix/Linux Binary Package Directory Contents of Directory bin mysqld server, client and utility programs docs MySQL manual in Info format man Unix manual pages include Include (header) files lib Libraries share Error messages, dictionary, and SQL for database installation support-files Miscellaneous support files 2 创建用户和组 此用户和组用于运行mysqld, shell>Groupadd mysql
Shell > useradd-r-g mysql-s / bin/false mysql #-r means create a system account
3 create symbolic links
Shell > ln-s full-path-to-mysql-VERSION-OS mysql
4 assign to the Path environment variable
Export PATH=$PATH:/usr/local/mysql/bin
5 initialize the data file path
Create a mysql-files folder in the mysql installation path to point to the secure_file_priv parameter and to import / export files
Shell > mkdir mysql-files
Shell > chown mysql:mysql mysql-files
Shell > chmod 750mysql-files
Shell > bin/mysqld-- initialize-- user=mysql
When you execute the initialize command, it is important to note that the owner of data-directory must be mysql, and then add-- user=mysql after initialize.
If mysql cannot know the basedir (installation path) or datadir data file path, use some to specify it.
Shell > bin/mysqld-initialize-user=mysql-basedir=/opt/mysql/mysql-datadir=/opt/mysql/mysql/data
Of course, you can also write to the my.cnf path
[mysqld]
Basedir=/opt/mysql/mysql
Datadir=/opt/mysql/mysql/data
The method of use is as follows
C:\ > bin/mysqld-defaults-file=C:\ my.ini-initialize
After initializing the data directory, start mysql
Bin/mysqld_safe-- user=mysql &
Then, after logging in, the installation of mysql is completed.
At this point, the study on "how to use binaries to install MySQL" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.