Navicat connection MySQL error description analysis

Navicat connection MySQL error description analysis

Local connection error description using Navicat

2013-Lost connection to MySQL server at 'reading initial communication packet', system error:0 "Internal error/check (Not system error)"

Error description

Check

Solution

cd /etc/mysql/mysql.conf.d/
sudo vim mysqld.cnf

Annotate the red box content

Notes

Restart the MySQL service and test the connection again

Connection successful
Check


environment

Virtual Machine Version

insert image description here

MySQL version

insert image description here

Preliminary preparation

Check MySQL running status

sudo systemctl mysql status

Startup Status
If it is not running, start the MySQL service using the sudo systemctl start mysql command

Change root password

After installing MySQL, the root password is empty by default. Change the root user password

mysqladmin -u root password "yourNewPassword";

Enter the MySQL interactive environment

sudo mysql -u root -p
# then enter your password 

Enter interactive

View All Libraries

show databases; 

show databases

Switch Library

use databaseName; 

insert image description here

New User Related

create

create user 'userName'@'%' identified by 'yourPassword';
# 'userName'@'%' @ The '%' after is the host configuration 

Create a new user

Check

You can see that no permissions are assigned

insert image description here

Assign permissions

grant all privileges on *.* to 'userName'@'%' identified by 'yourPassword';

Assign all permissions on all tables in all libraries to this user

insert image description here

flush privileges; 

flush

View this user again

Assigned permissions

The above is the detailed solution to the error when Navicat connects to MySQL. For more information about the error when Navicat connects to MySQL, please pay attention to other related articles on 123WORDPRESS.COM!

You may also be interested in:
  • Solve the problem of Navicat for MySQL reporting 2005 error when connecting to MySQL
  • Common errors and solutions for connecting Navicat to virtual machine MySQL
  • Navicat connects to MySQL8.0.11 and an error 2059 occurs
  • When Navicat connects to MySQL, it reports 10060, 1045 errors and the location of my.ini
  • Solve the 1251 error when establishing a connection between mysql and navicat
  • Solve the 3680 error when creating a new database in Navicat on Mac

<<:  Detailed explanation of the use of base tag in HTML

>>:  Example of how to implement underline effects using Css and JS

Recommend

Detailed explanation of the pitfalls of Apache domain name configuration

I have never used apache. After I started working...

Seven ways to implement array deduplication in JS

Table of contents 1. Using Set()+Array.from() 2. ...

Detailed explanation of JavaScript primitive data type Symbol

Table of contents Introduction Description Naming...

Detailed explanation of Tomcat core components and application architecture

Table of contents What is a web container? The Na...

A brief discussion on docker-compose network settings

Networks usage tutorial Official website docker-c...

The difference and use of json.stringify() and json.parse()

1. Differences between JSON.stringify() and JSON....

Vue implements graphic verification code login

This article example shares the specific code of ...

Learn how to write neat and standard HTML tags

Good HTML code is the foundation of a beautiful w...

Detailed explanation of the relationship between React and Redux

Table of contents 1. The relationship between red...

Docker installation and configuration command code examples

Docker installation Install dependency packages s...

Some common advanced SQL statements in MySQL

MySQL Advanced SQL Statements use kgc; create tab...

CSS realizes the layout method of fixed left and adaptive right

1. Floating layout 1. Let the fixed width div flo...

Detailed discussion of the differences between loops in JavaScript

Table of contents Preface Enumerable properties I...

CSS3 mobile vw+rem method to achieve responsive layout without relying on JS

1. Introduction (1) Introduction to vw/vh Before ...