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

MySQL learning database operation DML detailed explanation for beginners

Table of contents 1. Insert statement 1.1 Insert ...

VSCode Development UNI-APP Configuration Tutorial and Plugin

Table of contents Written in front Precautions De...

MySQL Flush-List and dirty page flushing mechanism

1. Review The Buffer Pool will be initialized aft...

React Fiber structure creation steps

Table of contents React Fiber Creation 1. Before ...

How to set mysql permissions using phpmyadmin

Table of contents Step 1: Log in as root user. St...

js+css to realize three-level navigation menu

This article example shares the specific code of ...

InnoDB type MySql restore table structure and data

Prerequisite: Save the .frm and .ibd files that n...

Detailed explanation of loop usage in javascript examples

I was bored and sorted out some simple exercises ...

Node.js uses express-fileupload middleware to upload files

Table of contents Initialize the project Writing ...

Example of asynchronous file upload in html

Copy code The code is as follows: <form action...

Solution to the problem of repeated pop-up of Element's Message pop-up window

Table of contents 1. Use 2. Solve the problem of ...

How to update the view synchronously after data changes in Vue

Preface Not long ago, I saw an interesting proble...

How to use Docker-compose to deploy Django applications offline

Table of contents Install Docker-ce for the devel...