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--
The following mainly brings you to use CentOS7 installation MySQL5.7 tutorial analysis, hope that the use of CentOS7 installation MySQL5.7 tutorial analysis can bring you practical use, this is also my main purpose of editing this article. All right, don't talk too much nonsense, let's just read the following.
The main features of MySQL 5.7are as follows:
Native support for Systemd
Better performance: better optimization for multicore CPU, solid state drives, and locks
Better InnoDB storage engine
More robust replication: replication brings a solution that does not lose data at all, and traditional financial customers can also choose to use MySQL databases.
Note: mysql-5.6.3 already supports multithreaded master-slave replication.
New sys library: this will be the most frequently accessed library by DBA in the future
II. MySQL version
SQL structured query language
Community version Community Edition, commercial version Enterprise Edition
Alpha Beta RC GA
Third, install mysql5.7
System: centos7.2 x86x64
Uninstall mariadb because centos7.2 has mariadb installed by default
Check to see if mariadb is installed
Rpm-qa | grep mariadb
Uninstall mariadb
Rpm-e mariadb-libs-- nodeps
Rpm installation:
For the simplest way to install the mysql-server service, you only need to install the following four software packages, which can be installed using the rpm-ivh command
Mysql-community-common-5.7.18-1.el7.x86_64.rpm
Mysql-community-libs-5.7.18-1.el7.x86_64.rpm-(dependent on common)
Mysql-community-client-5.7.18-1.el7.x86_64.rpm-(dependent on libs)
Mysql-community-server-5.7.18-1.el7.x86_64.rpm-(dependent on client, common)
The next step is to initialize the database. We can use the following commands, and the effect is the same.
[root@5201351 ~] # mysql_install_db-- datadir / / must be specified, and a ~ / .mysql_secret password file will be generated after execution (not recommended)
[root@5201351 ~] # mysqld-- the new version of initialize / / recommends this method. The executor will generate a random password in / var/log/mysqld.log.
Change the users and groups of the mysql database directory, and then start the mysql database
[root@5201351] # chown mysql:mysql / var/lib/mysql-R
[root@5201351 ~] # systemctl start mysqld.service / / start the mysql database service
Log in to mysql according to the password in the previous step and change the password of the root user. The new version of mysql cannot execute any commands before changing the password after the first login.
[root@5201351 ~] # mysql-uroot-p 'randomly generated password in the figure above'
Mysql > set password=password ('XXXXXXXXXX')
Finally, we can also create users and assign permissions according to the actual situation.
Mysql > create user 'root'@'192.168.100.2' identified by' XXXXXXX'
Mysql > GRANT ALL PRIVILEGES ON dbname.* to 'root'@'192.168.100.2'
Mysql > flush privileges
=
Finally, it is important to note that there is no Password field in the user table under the new version of mysql database, but the encrypted user password is stored in the authentication_string field.
For the above on the use of CentOS7 to install MySQL5.7 tutorial analysis, we do not find it very helpful. If you need to know more, please continue to follow our industry information. I'm sure you'll like it.
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.