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 installation method of MySQL?

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

This article will explain in detail what is the installation method of MySQL, the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

First of all, we will teach you to install our MySQL with linux. There are two ways in linux: rpm package management, rpm is equivalent to our local installation, and second: yum installation, yum installation is equivalent to online installation. All right, now let's go to our installation tutorial:

MySQL online installation mode

1. Turn on the virtual machine:

Check whether MySQL software is available: rpm-qa | grepmysql

If so, we can use the uninstall method:

Yumremovemysqlmysql-servermysql-libsmysql-common

Rm-rf/var/lib/mysql

Rm/etc/my.cnf

Check to see if there is any mysql software, and if so, continue to delete it.

After the software is uninstalled, you can delete the database of mysql if necessary: / var/lib/mysql

two。 Download the rpm package:

To install mysql using yum, to use mysql's yum repository, first download the repository suitable for your system from the official website

We are centos6.4 and the corresponding rpm package is: mysql-community-release-el6-5.noarch.rpm

Then upload mysql-community-release-el6-5.noarch.rpm to the linux system.

3. List of installed warehouses:

Note: under the current directory of the uploaded rpm package of mysql, execute the following command:

Yumlocalinstallmysql-community-release-el6-5.noarch.rpm

4. Install mysql

Yuminstallmysql-community-server

Rpm local installation mode

If you don't have a network environment, you can install it using the mysql installation package under the mysql-rpm folder in Resources.

Step 1: upload the following files to the linux system

Step 2: use the rpm command to install

After installation, after starting the service, setting the password, and remote authorization, you can use the

Start mysql

Servicemysqldstart

Set the root user password

After the mysql database is installed, there will only be one root administrator account, but the root account has not yet set a password for it. Some initialization of the database will be carried out when the mysql service is started for the first time. In the long list of information output, we can see the following line of information:

/ usr/bin/mysqladmin-urootpassword'new-password'// sets the password for the root account

Mysql remote connection authorization

Mysql > GRANTALLPRIVILEGESON*.*TO'myuser'@'%'IDENTIFIEDBY'mypassword'WITHGRANTOPTION

Note: 'myuser',' mypassword' need to be replaced with the actual user name and password.

Turn off linux's firewall

[root@bogonlinux] # serviceiptablesstop

Iptables: clear firewall rules: [OK]

Iptables: set chain to policy ACCEPT:filter [OK]

Iptables: uninstalling module: [OK]

What is the installation method of MySQL is shared 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