Install mysql offline using rpm under centos 6.4

Install mysql offline using rpm under centos 6.4

Use the rpm installation package to install mysql offline, just for your reference

Preparation:

Download the MySQL offline rpm installation package from the official website (I won’t demonstrate it here, I’ll just use the existing one for demonstration)

Uninstall and clean up the remnants of previous MySQL installation and uninstallation

1. Detect and uninstall MySQL installed on this machine

rpm -qa|grep -i mysql

The noarch one is the source address package, it is the same even if it is not installed

2. As shown in the figure above, MySQL has been installed in the system. Uninstall it:

[root@hellxz ~]# yum remove mysql

Then execute the first step again to check whether MySQL is installed. If so, you can directly uninstall it by adding the package name you just found with yum remove.

3. Check whether the /var/lib/mysql folder exists. If so, please delete it. It contains the remaining MySQL database. If you do not delete it, the newly installed MySQL will not create a new database.

If so, delete

rm -rf /var/lib/mysql

Install mysql

1. Upload the previously downloaded RPM package to centos and install it, first installing the server.

rpm -ivh mysql-community-server-5.6.26-2.el6.i686.rpm

The above picture shows a normal installation. Please ignore the following issues if the installation is normal.

1.1 There may be problems here, as shown in the figure below. When this happened, I was very entangled for a while. In the end, I added the package name that was not installed to yum install. Strangely, it was installed without much traffic. . . The original package says 215M, but mine shows less than 5M...very weird

2. Then the client should be installed, but I reported missing dependencies, so I have to install something else first. . Here is my installation method:

rpm -ivh mysql-community-common-5.6.26-2.el6.i686.rpm
rpm -ivh mysql-community-libs-5.6.26-2.el6.i686.rpm 
rpm -ivh mysql-community-client-5.6.26-2.el6.i686.rpm

3. Start the MySQL service after the installation is complete:

#Don't ask me why I added d, it may be a different version service mysqld restart

4. Change the default password:

#-u is followed by the username, and root is followed by the password. Modify as appropriate /usr/bin/mysqladmin -u root password 'root'

5. Open the mysql command line:

#There is no space after -u, just add the username, and after entering this, you will be prompted to enter the password mysql -uroot -p

6. Remote connection authorization (not required for local use):

#Authorization: the @ before is the user name, the by after is the password GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;

7. Use navicat to connect to the mysql experiment in the virtual machine:

8. If step 7 appears

Please turn off the firewall in centos and temporarily turn off the code:

Disable the firewall command: service iptables stop

Permanently turn off the firewall: chkconfig iptables off

End of tutorial.

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • centos7.2 offline installation mysql5.7.18.tar.gz
  • Detailed explanation of how to install offline JDK1.8 on centos7.0
  • CentOS installation steps for Mogodb (online &&offline)
  • CentOS offline installation of gcc (version 4.8.2) detailed introduction
  • Detailed installation of Mongodb in CentOS (online and offline)
  • CentOS/RedHat 6.5 Offline Installation of Docker
  • Detailed tutorial on installing MySQL offline on CentOS7

<<:  Detailed explanation of the basic use of centos7 firewall in linux

>>:  CocosCreator classic entry project flappybird

Recommend

Why does using limit in MySQL affect performance?

First, let me explain the version of MySQL: mysql...

Using js to implement simple switch light code

Body part: <button>Turn on/off light</bu...

How to Understand and Identify File Types in Linux

Preface As we all know, everything in Linux is a ...

How to design and optimize MySQL indexes

Table of contents What is an index? Leftmost pref...

Detailed explanation of several solutions for JavaScript interruption requests

Table of contents 1 Promise Interrupt the call ch...

How to use MySQL common functions to process JSON

Official documentation: JSON Functions Name Descr...

Javascript destructuring assignment details

Table of contents 1. Array deconstruction 2. Obje...

Interviewers often ask questions about React's life cycle

React Lifecycle Two pictures to help you understa...

Ubuntu 20.04 firewall settings simple tutorial (novice)

Preface In today's increasingly convenient In...

Summary of CSS3 practical methods (recommended)

1. Rounded border: CSS CodeCopy content to clipbo...

Web2.0: Causes and Solutions of Information Overload

<br />Information duplication, information o...

Three ways to prevent MySQL from inserting duplicate data

Create a new table CREATE TABLE `person` ( `id` i...