C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqld --console 2019-05-11T04:20:13.041783Z 0 [System] [MY-010116] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.16) starting as process 19832 2019-05-11T04:20:13.044980Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an aliasfor the character set UTF8MB3, but will be an aliasfor UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous. 2019-05-11T04:20:15.076636Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2019-05-11T04:20:15.078181Z 0 [ERROR] [MY-010262] [Server] Can't start server: Bind on TCP/IP port: 通常每个套接字地址(协议/网络地址/端 口)只允许使用一次。
2019-05-11T04:20:15.078189Z 0 [ERROR] [MY-010257] [Server] Do you already have another mysqld server running on port: 3306 ? 2019-05-11T04:20:15.094148Z 0 [ERROR] [MY-010119] [Server] Aborting 2019-05-11T04:20:16.309270Z 0 [System] [MY-010910] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.16) MySQL Community Server - GPL.
C:\Program Files\MySQL\MySQL Server 8.0\bin>mysql -u root -p Enter password: ************ ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
其原因是没有start服务.
启动服务后的操作:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
C:\Program Files\MySQL\MySQL Server 8.0\bin>mysql -u root -p Enter password: ************ Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 8.0.16
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'forhelp. Type '\c' to clear the current input statement.
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '新密码'; Query OK, 0 rows affected (0.01 sec)