On the local connection to the server mysql database

SSH is therefore no longer mentioned in the demo installation time

Here mysql port 3306

When you can use the SSH connection then use port 3306

First, the newly installed mysql is no password

Second, set the mysql password to connect ( after change the password needed to restart the mysql service )

 1. Select mysql mysql data set after entering a password (password set here: admin)

use mysql;
UPDATE user SET password=PASSWORD('admin')WHERE user='root';

2. Exit mysql service and restart the mysql service

Exit; // or hold down the ctrl + c to exit 
Service mysqld restart     // restart mysql

Now connection is necessary to enter the password

          

 

Guess you like

Origin www.cnblogs.com/zhizou/p/11368566.html