Summary of 3 minor errors encountered during MySQL 8.0 installation

Summary of 3 minor errors encountered during MySQL 8.0 installation

Preface

In the past, the company used the 5.7 series of MySQL. With the release of version 8.0, we also wanted to try to upgrade it. There are two minor errors, which are recorded here.

Before you start, if you are not clear about the MySQL 8.0 installation steps, you can refer to this article: https://www.jb51.net/article/98270.htm. Well, let's take a look at the detailed introduction.

Path settings:

Installation package path: /data/mysql80/

Data Path:

/data/mysql/

Here is a description of the errors and solutions I encountered during installation:

Question 1: Premission denied

Because I copied the mysql80 installation file from another server instead of downloading and unzipping it from the official website, I got an error message when initializing MySQL and starting the MySQL service, indicating that I did not have sufficient permissions.

Initialization error:

Error when starting the service:

Solution:

For the first error, execute the following code:

chmod -R 755 /data/mysql80/bin/

For the second error, execute the following code:

chmod -R 755 ./mysql.server

(This file is /data/mysql80/support-files)

and

chmod -R 755 /etc/init.d/mysqld

Problem 2 ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'password('XXXXX')' at line 1

When logging into MySQL and changing the root password, an error is reported using the old method SET PASSWORD=PASSWORD('[new password]').

Check out the relevant explanations on the Internet:

The password authentication plugin for previous versions of MySQL was "mysql_native_password", but now "caching_sha2_password" is used.

Solution:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new password';

FLUSH PRIVILEGES;

Question 3: Enabling remote login reports an error: You are not allowed to create a user with GRANT

When remote login is enabled, the following error message is displayed:

Solution:

By command

select host,user,authentication_string,plugin from user;

Check that the host field value is indeed limited to localhost;

Directly through the command

update user set host = "%" where user='root';

Modify directly.

Verify that you can connect remotely.

Summarize

The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. If you have any questions, you can leave a message to communicate. Thank you for your support for 123WORDPRESS.COM.

You may also be interested in:
  • How to solve various errors when using JDBC to connect to Mysql 8.0.11
  • Steps for installing MySQL 8.0.16 on Windows and solutions to errors
  • MySQL 8.0 error The server requested authentication method unknown to the client solution

<<:  Analysis of MySQL general query log and slow query log

>>:  How to install Odoo12 development environment on Windows 10

Recommend

A complete list of commonly used MySQL functions (classified and summarized)

1. Mathematical Functions ABS(x) returns the abso...

How to create a table in mysql and add field comments

Directly post code and examples #Write comments w...

Detailed explanation of various join summaries of SQL

SQL Left Join, Right Join, Inner Join, and Natura...

HTML form tag usage learning tutorial

Forms in HTML can be used to collect various type...

A brief discussion on how to use slots in Vue

How to define and use: Use the slot tag definitio...

Docker installs mysql and solves the Chinese garbled problem

Table of contents 1. Pull the mysql image 2. Chec...

Basic ideas for finding errors in Web front-end development

WEB development mainly consists of two interactio...

Installation method of mysql-8.0.17-winx64 under windows 10

1. Download from the official website and unzip h...

MySQL log trigger implementation code

SQL statement DROP TRIGGER IF EXISTS sys_menu_edi...

Detailed steps for setting up host Nginx + Docker WordPress Mysql

environment Linux 3.10.0-693.el7.x86_64 Docker ve...

Pycharm2017 realizes the connection between python3.6 and mysql

This article shares with you how to connect pytho...

How to open a page in an iframe

Solution: Just set the link's target attribute...

Nginx request limit configuration method

Nginx is a powerful, high-performance web and rev...

Vue recursively implements three-level menu

This article example shares the specific code of ...