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

Two query methods when the MySQL query field type is json

The table structure is as follows: id varchar(32)...

Example of CSS3 to achieve div sliding in and out from bottom to top

1. First, you need to use the target selector of ...

Detailed explanation of the basic use of centos7 firewall in linux

1. Basic use of firewalld start up: systemctl sta...

Six ways to reduce the size of Docker images

Since I started working on Vulhub in 2017, I have...

IDEA2021 tomcat10 servlet newer version pitfalls

Because the version I used when I was learning wa...

A brief understanding of the three uses of standard SQL update statements

1. Environment: MySQL-5.0.41-win32 Windows XP Pro...

How to notify users of crontab execution results by email

symptom I set a crontab task on a centos7 host, b...

XHTML tags should be used properly

<br />In previous tutorials of 123WORDPRESS....

Design a data collector with vue

Table of contents Scenario Core Issues Status mon...

JS ES new feature of variable decoupling assignment

Table of contents 1. Decoupled assignment of arra...