In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Today, I will talk to you about how to install mysql5.7.21 in binary mode in CentOS 6.9. many people may not understand it very well. in order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.
The preface is 3 times faster than MySQL 5.6. at the same time, it also improves usability, manageability and security. Some important enhancements are as follows: 1. Performance and scalability: improve the scalability of InnoDB and the performance of temporary tables to achieve faster network and big data loading and other operations. 2.JSON support: with MySQL's JSON function, you can combine the flexibility of NoSQL with the power of relational databases. 3. Improve replication to improve the performance of availability. Includes multi-source replication, multi-thread enhancement, online GTIDs, and enhanced semi-synchronous replication. 4. Performance mode provides a better perspective. We have added many new monitoring features to reduce space and overload, and use the new SYS mode to significantly improve ease of use. 5. Security: we implement the "security first" requirement, and many of the new MySQL 5.7features help users secure their databases. 6. Optimization: we rewrote most of the parsers, optimizers, and cost models. This improves maintainability, scalability and performance. 7.GIS: MySQL 5.7new features, including InnoDB spatial indexing, using Boost.Geometry, while improving integrity and standards compliance. Experimental environment: VMware Workstation Pro 14 (trial version) system platform: CentOS release 6.9 (Final) kernel 2.6.32-696.el6.x86_641. Go to the official website to download a suitable binary package.
Https://dev.mysql.com/downloads/mysql/
Mysql-5.7.21-linux-glibc2.12-x86_64.tar.gz
Check if the database is installed in the system.
# rpm-qa | grep MariaDB#rpm-qa | grep mysql2. Create an account and group # getent group mysql > / dev/null for launching mysql | | groupadd mysql#getent passwd mysql > / dev/null | | useradd-g mysql-r-s / sbin/nologin mysql3. Extract the package to / usr/local#tar xvf mysql-5.7.21-linux-glibc2.12-x86_64.tar.gz-C / usr/local/4. Create a soft link mysql to point to the extracted directory # cd / usr/local/#ln-s mysql-5.7.21-linux-glibc2.12-x86_64/ mysql5. Modify the owner and group # chown-R mysql.mysql mysql/6 of the mysql folder. Add PATH to the echo 'PATH=/usr/local/mysql/bin:$PATH' > > / etc/profile.d/mysql.sh check file # cat / etc/profile.d/mysql.sh load the environment variable file and check # source / etc/profile.d/mysql.sh#echo $PATH7. Create a database to store folders and related files and modify permissions # mkdir-pv / data/mysqldb/3306/ {logs,run,data} # touch / data/mysqldb/3306/run/mysqld.pid#touch / data/mysqldb/3306/logs/mysql-error.log#chown-R mysql.mysql / data/mysqldb/#chmod-R 770 / data/mysqldb file has not been created, Mysql will report an error of 8. Modify the configuration file # vim / etc/my.cnf [client] port = 3306 socket=/var/lib/mysql/mysql.sock > where the default is [mysqld] user=mysql port = 3306 socket=/var/lib/mysql/mysql.sock basedir = / usr/local/mysqldatadir = / data/mysqldb/3306/data pid-file=/data/mysqldb/3306/run/mysqld.pid log-error=/data/mysqldb/3306/logs/mysql-error.log9. Initialize the database # cd / usr/local/mysql# bin/mysqld-- defaults-file=/etc/my.cnf-- initialize-insecure-- user=mysql-- datadir=/data/mysqldb/3306/dataMysql 5.7.There are more friendly tips for password security, 2018-03-03T15:16:23.708677Z 1 [Warning] root@localhost is created with an empty password! Please consider switching off the-- initialize-insecure option.--initialize-insecure initializes the database with an empty password-- initialize randomly generates a password and displays it on the screen, which you must provide the first time you log in. 10. Copy the startup service script to the / etc/init.d directory # cp mysql/support-files/mysql.server / etc/rc.d/init.d/mysqld11. Add boot # chkconfig-- add mysqld# chkconfig mysqld on#chkconfig-- list mysqldmysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off12. Start the mysql service # service mysqld startStarting MySQL. [OK] 13. Check and confirm
Check whether port 3306 is open
# ss-ntl | grep 3306LISTEN 0 50 *: 3306 *: *
Confirm the version
# mysql-Vmysql Ver 14.14 Distrib 5.7.21, for linux-glibc2.12 (x86 / 64) using EditLine wrapper14. Security configuration # / usr/local/mysql/bin/mysql_secure_installation follow the prompts to Press y | Y for Yes, any other key for No: y > No y, no next step There are three levels of password validation policy: > list password requirements LOW Length > = 8MEDIUM Length > = 8, numeric, mixed case, and special charactersSTRONG Length > = 8, numeric, mixed case, special characters and dictionary Please enter 0 = LOW 1 = MEDIUM and 2 = STRONG: 0 > selected number Please refer to the above password requirements Please set the password for root here.New password: > set password Re-enter new password: Do you wish to continue with the password provided? (Press y | Y for Yes, any other key for No): y > update password Remove anonymous users? (Press y | Y for Yes, any other key for No): y > do you want to remove anonymous login Disallow root login remotely? (Press y | Y for Yes, any other key for No): n > do you want to remove remote root login, please yRemove test database and access to it for production environment? (Press y | Y for Yes, any other key for No): y > do you want to remove the test database? it seems that the binary installation does not include the test database Reload privilege tables now? (Press y | Y for Yes, any other key for No): y > reload the permission table, which takes effect immediately. Success. All done!15. Client connection # mysql-uroot-pEnter password: Welcome to the MySQL monitor. Commands end with; or\ g.Your MySQL connection id is 6Server version: 5.7.21 MySQL Community Server (GPL) Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.mysql >
At this point, Mysql 5.7.21 is installed in binary mode, which is suitable for rapid deployment.
After reading the above, do you have any further understanding of how to install mysql5.7.21 in binary mode in CentOS 6.9? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
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.