Ubuntu MySQL version upgraded to 5.7

Ubuntu MySQL version upgraded to 5.7

A few days ago, the library said that the server (Ubuntu 14.04) had a security vulnerability and would be shut down if it was not repaired on time.

After looking at the vulnerability list, I found that the main issues were with the ssh and mysql versions.

I upgraded MySQL to 5.7. I backed up the data before the upgrade, but found that the data was not lost after the upgrade.

1 Configure mysql-apt and make relevant updates

sudo wget https://dev.mysql.com/get/mysql-apt-config_0.8.1-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.1-1_all.deb #Select mysql5.7 during the installation process

sudo apt-get update
 

2 Install the new version of the database and update the file version

sudo apt-get install mysql-server
sudo mysql_upgrade -uroot -p

3 Restart mysql and check the data

sudo service mysql restart
mysqlcheck -uroot -p --all-databases

4 Modify user directory and remote login configuration

# Modify the user directory sudo service mysql stop
sudo usermod -d /var/lib/mysql/mysql
sudo service mysql start

# Comment out the line bind-address = 127.0.0.1 and save it sudo vim /etc/mysql/mysql.conf.d/mysqld.conf

# Restart sudo service mysql restart


5 Check the mysql version to see if it is started successfully

mysql --version
netstat -anp | grep 'mysql'

6 Remote connection to mysql

mysql -h ip -u root -p

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:
  • Detailed explanation of how to safely upgrade MySQL
  • MySQL Upgrade Guide
  • How to upgrade PHP and MySQL in CentOS system
  • Install and upgrade MySQL to the new version (5.1-5.7) under Linux
  • Problems and solutions when upgrading MySQL 5.1.61 to MySQL 5.6.19 on Centos 6.3
  • How to upgrade MySQL version 5.5.x to 5.6.x
  • Illustrated MYSQL installation and data upgrade
  • Notes on Upgrading MySQL on Windows
  • How to upgrade MySQL 5.6 to 5.7 under Windows
  • How to upgrade MySQL 5 to MySQL 5.5

<<:  Understanding what Node.js is is so easy

>>:  Detailed understanding and comparative analysis of servers Apache, Tomcat and Nginx

Recommend

Install mysql5.7 on Ubuntu 18.04

Ubuntu 18.04 installs mysql 5.7 for your referenc...

Detailed explanation of the usage of setUp and reactive functions in vue3

1. When to execute setUp We all know that vue3 ca...

Vue implements a scroll bar style

At first, I wanted to modify the browser scroll b...

Solution to the problem that Docker container cannot access Jupyter

In this project, the Docker container is used to ...

Mini Program implements list countdown function

This article example shares the specific code for...

Common usage of hook in react

Table of contents 1. What is a hook? 2. Why does ...

MySQL 8.0.15 installation graphic tutorial and database basics

MySQL software installation and database basics a...

WeChat applet implements a simple handwritten signature component

Table of contents background: need: Effect 1. Ide...

The reason why MySQL uses B+ tree as its underlying data structure

We all know that the underlying data structure of...

Working principle and implementation method of Vue instruction

Introduction to Vue The current era of big front-...

Docker advanced method of rapid expansion

1. Command method Run the nginx service in the cr...

React configuration px conversion rem method

Install related dependencies npm i lib-flexible -...