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

Linux /etc/network/interfaces configuration interface method

The /etc/network/interfaces file in Linux is used...

Linux system disk formatting and manually adding swap partition

Windows: Support NTFS, FAT Linux supports file fo...

Docker installation and configuration command code examples

Docker installation Install dependency packages s...

Example of JSON output in HTML format (test interface)

To display the JSON data in a beautiful indented ...

How to make JavaScript sleep or wait

Table of contents Overview Checking setTimeout() ...

Use of Linux xargs command

1. Function: xargs can convert the data separated...

Detailed explanation of JDBC database link and related method encapsulation

Detailed explanation of JDBC database link and re...

Index in MySQL

Preface Let's get straight to the point. The ...

JavaScript uses setTimeout to achieve countdown effect

In order to enhance the ability to write JavaScri...

Vue large screen display adaptation method

This article example shares the specific code for...

Detailed usage of MYSQL row_number() and over() functions

Syntax format: row_number() over(partition by gro...

Script to quickly list all host names (computer names) in the LAN under Linux

Recently, I have a need to list all host names in...

Use standard dl, dt, dd tags to discard table lists

Now, more and more front-end developers are starti...