mysql> select user,host,plugin,authentication_string from mysql.user where user='root'; +------+-----------+-----------------------+-----------------------+ user host plugin authentication_string +------+-----------+-----------------------+-----------------------+ root localhost mysql_native_password +------+-----------+-----------------------+-----------------------+ 1 row in set (0.00 sec)
mysql> select user,host,plugin,authentication_string from mysql.user where user='root'; +------+-----------+-----------------------+-------------------------------------------+ user host plugin authentication_string +------+-----------+-----------------------+-------------------------------------------+ root localhost mysql_native_password *01A6717B58FF5C7EAFFF6CB7C96F7428EA65FE4C +------+-----------+-----------------------+-------------------------------------------+ 1 row in set (0.00 sec)
G:\mysql\mysql-8.0.17-winx64\bin λ net start mysql MySQL 服务正在启动 .. MySQL 服务已经启动成功。
# 注意下面的-P4000,是指定端口为4000,如果你端口是默认的3306,可以不用添加 G:\mysql\mysql-8.0.17-winx64\bin λ mysql -u root -P4000 -p Enter password: ******** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 8.0.17 MySQL Community Server - GPL
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.