Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the Mysql installation process?

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces you to the Mysql installation process, the content is very detailed, interested friends can refer to, hope to be helpful to you.

Environment description:

Operating system: Red Hat Linux 6

Install the Mysql5.7 version

Installation notes:

Prepare the installation package for mysql

Prepare the installation environment

Operation instructions:

Download the installation package of mysql

Https://www.mysql.com/downloads/ visits the mysql download address and downloads it by doing the following.

Put the downloaded mysql installation package into your own installation directory and extract it.

[root@root /] # cd / soft/ [root@root soft] # ll total consumption 1151432 RW Murray. 1 root root 227512320 August 7 17:59 MySQL-5.6.41-1.el6.x86villages 64.rpmMurbundle.Tarmurr RWMUR. 1 root root 475770880 August 7 18:21 mysql-5.7.23-1.el6.x86q64.rpmMurbundle.Tarmuryrwarelashi. 1 7155 31415 24024136 June 11 11:21 mysql-community-client-5.7.23-1.el6.x86mm 64.rpmMurray RWMui RwMui Rafael. 1 7155 31415 340072 June 11 11:21 mysql-community-common-5.7.23-1.el6.x86mm 64.rpm RW Muhami RW Muhami. 1 7155 31415 3736628 June 11 11:21 mysql-community-devel-5.7.23-1.el6.x86mm 64.rpm RWMui RW Muhami Rafael. 1 7155 31415 39496088 June 11 11:21 mysql-community-embedded-5.7.23-1.el6.x86mm 64.rpm RWMI RW Muhami Rafael. 1 7155 31415 137638820 June 11 11:21 mysql-community-embedded-devel-5.7.23-1.el6.x86Ukraine 64.rpmMurr RWMui RW Muhami. 1 7155 31415 2192692 June 11 11:21 mysql-community-libs-5.7.23-1.el6.x86mm 64.rpm RWMui RW Muhami Rafael. 1 7155 31415 1723712 June 11 11:21 mysql-community-libs-compat-5.7.23-1.el6.x86mm 64.rpm RWMui RW Muhami Rafael. 1 7155 31415 160480880 June 11 11:21 mysql-community-server-5.7.23-1.el6.x86Ukraine 64.rpmMurray RWMurray Rafael. 1 7155 31415 106124936 June 11 11:21 mysql-community-test-5.7.23-1.el6.x86_64.rpm

Prepare the installation environment

Check whether a mysql service is available on the current system, method: rpm-qa | grep mysql. If so, use rpm to uninstall it. The command you can use is the rpm-ev program (if there is a dependency problem with the uninstall report, the rpm-e-nodeps program uninstalls it,-- nodeps skips the dependency)

[root@root mysql] # rpm-qa | grep mysqlmysql-libs-5.1.71-1.el6.x86_64root@root mysql] # rpm-ev mysql-libs-5.1.71-1.el6.x86_64 / * reporting dependency * / error: Failed dependencies: libmysqlclient.so.16 () (64bit) is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64 libmysqlclient.so.16 (libmysqlclient _ 16) (64bit) is needed by (installed) postfix-2:2.6.6-2.2.el6_1.x86_64 [root@root soft] # rpm-e-- nodeps mysql-libs-5.1.71-1.el6.x86_64 / * Uninstall without dependencies * / [root@root soft] #

Third, install the mysql service

Go to the unzipped directory of the mysql package and install it with rpm. Pay attention to the installation order, otherwise a dependency error may be reported.

[root@root soft] # rpm-ivh mysql-community-common-5.7.23-1.el6.x8664.rpm [root @ root soft] # rpm-ivh mysql-community-libs-5.7.23-1.el6.x8664.rpm [root @ root soft] # rpm-ivh mysql-community-client-5.7.23-1.el6.x8664.rpm [root @ root soft] # rpm-ivh mysql-community-server-5.7.23-1.el6.x86_64.rpm

Installation is complete, modify the configuration file. In / etc/my.cnf

[root@root etc] # vim my.cnf [mysqld] skip-grant-tables / * added to log in without password * /

Start the mysql service and enter mysql to enter the database. (if enabled successfully, you can use netstat-nlap | grep mysql to view the mysql service)

[root@root soft] # service mysqld start [root@root soft] # mysql Welcome to the MySQL monitor. Commands end with; or\ g.Your MySQL connection id is 23Server version: 5.7.23 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, you can use the navicat tool to connect to the mysql service. If the connection is not available, check that port 3306 is developed and try to turn off linux Firewall. Service iptables stop

After trying to connect successfully, we can set the password for the mysql service.

Select the user first

Mysql > use mysql;Reading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with-ADatabase changedmysql > update user set authentication_string = password ('111111'), password_expired = 'nasty, password_last_changed = now () where user =' root';Query OK, 1 row affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 1mysql > flush privileges; / * must be executed, otherwise later error message * / Query OK, 0 rows affected (0.00 sec) mysql >

Note: if this password setting is not correct, you can try other methods to set the password (such as: mysqladmin-u root password "11111111"). After setting the password, remember to go to the my.cnf configuration file to comment out the skip-grant-tables and restart the mysql service. This can be logged in with a username and password.

On the Mysql installation process to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report