In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Here are the detailed steps for installing MySQL-5.7.24 in binary mode. The secret of the text is that it is close to the topic. So, forget the gossip, let's go straight to the following, and I'm sure you'll benefit from reading this article on detailed steps for installing MySQL-5.7.24 in binary mode.
1. To ensure that there is dependent libaio software in the system, use the following command
[root@localhost ~] # yum-y install libaio [root@localhost ~] # rpm-Q libaiolibaio-0.3.109-13.el7.x86_64
two。 Download the mysql-5.7.24 package using the wget command
[root@localhost ~] # wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz
3. Extract the mysql installation package to the specified directory with the following command:
[root@localhost] # tar xf mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz-C / usr/local/
4. Enter the / usr/local directory
[root@localhost ~] # cd / usr/local/
5. Create a soft link for the mysql installation directory
[root@localhost local] # ln-s mysql-5.7.24-linux-glibc2.12-x86_64/ mysql
6. Add mysql users and groups and
[root@localhost local] # useradd-M-s / sbin/nologin mysql
7. Change the current directory owner to the newly created mysql user with the following command:
[root@localhost mysql] # chown-R mysql:mysql. /
8. Initialize the mysql database (create default libraries and tables) with the following command:
[root@localhost mysql] # / bin/mysqld-- user=mysql-- basedir=/usr/local/mysql-- datadir=/usr/local/mysql/data-- initialize
Record the randomly generated login password: e9iIEYBa9tSecretf
9. Start the mysqld service with the following command
[root@localhost mysql] # vim / etc/ my.cnf [mysqld] datadir=/usr/local/mysql/datasocket=/tmp/ mysql.sock [mysqld _ safe] log-error=/usr/local/mysql/data/mysql.logpid-file=/usr/local/mysql/data/mysql.pid [root@localhost mysql] #. / support-files/mysql.server startStarting MySQL.Logging to'/ usr/local/mysql/data/mariadb.log'.. SUCCESS! [root@localhost mysql] # netstat-lnpt | grep: 3306tcp6 0 0: 3306:: * LISTEN 2220/mysqld
10. Add the mysqd service to the system service with the following command
[root@localhost mysql] # cp support-files/mysql.server / etc/init.d/mysqld [root@localhost mysql] # ls-l / etc/init.d/mysqld-rwxr-xr-x 1 root root 10576 December 7 16:12 / etc/init.d/mysqld [root@localhost mysql] # service mysqld restartShutting down MySQL.. SUCCESS!Starting MySQL.. SUCCESS!
11. Log in to the mysql database with a random password, with the following command
[root@localhost mysql] #. / bin/mysql-u root-p
Wait for the system prompt and enter a random password to log in.
twelve。 Set the new password for the mysql administrative user root
[root@localhost mysql] #. / bin/mysqladmin-u root-pallee9iIEYBa9tfolf 'password' 123456'
13. Add the mysql command to the system command execution path for ease of use.
[root@localhost mysql] # ln-s / usr/local/mysql/bin/* / usr/local/bin/ [root@localhost mysql] # cd [root@localhost ~] # mysql-u root-p123456
Is there anything you don't understand about the detailed steps of installing MySQL-5.7.24 in binary mode above? Or if you want to know more about it, you can continue to follow our industry information section.
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.