Suggestion [3,General]: 找不到命令 /MySQLd.exe,但它確實(shí)存在于當(dāng)前位置。默認(rèn)情況下,Windows PowerShell 不會(huì)從當(dāng)前位置加
載命令。如果信任此命令,請(qǐng)改為鍵入“.\/mysqld.exe”。有關(guān)詳細(xì)信息,請(qǐng)參閱 "get-help about_Command_Precedence"。
PS D:\Development\DataBase\mysql-8.0.16-winx64\bin>
PS D:\Development\DataBase\mysql-8.0.16-winx64\bin>
PS D:\Development\DataBase\mysql-8.0.16-winx64\bin>
PS D:\Development\DataBase\mysql-8.0.16-winx64\bin> ./mysqld --initialize --console
2019-07-26T13:04:40.868710Z 0 [System] [MY-013169] [Server] D:\Development\DataBase\mysql-8.0.16-winx64\bin\mysqld.exe (
mysqld 8.0.16) initializing of server in progress as process 11000
2019-07-26T13:04:40.875362Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for th
e character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to
be unambiguous.
2019-07-26T13:05:01.278758Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: KR+jt(_k
q1G7
2019-07-26T13:05:08.823938Z 0 [System] [MY-013170] [Server] D:\Development\DataBase\mysql-8.0.16-winx64\bin\mysqld.exe (
mysqld 8.0.16) initializing of server has completed
PS D:\Development\DataBase\mysql-8.0.16-winx64\bin>
站在用戶的角度思考問(wèn)題,與客戶深入溝通,找到恭城網(wǎng)站設(shè)計(jì)與恭城網(wǎng)站推廣的解決方案,憑借多年的經(jīng)驗(yàn),讓設(shè)計(jì)與互聯(lián)網(wǎng)技術(shù)結(jié)合,創(chuàng)造個(gè)性化、用戶體驗(yàn)好的作品,建站類型包括:成都做網(wǎng)站、網(wǎng)站設(shè)計(jì)、外貿(mào)營(yíng)銷網(wǎng)站建設(shè)、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣、域名注冊(cè)、虛擬主機(jī)、企業(yè)郵箱。業(yè)務(wù)覆蓋恭城地區(qū)。
PS D:\Development\DataBase\mysql-8.0.16-winx64\bin> ./mysqld install
Service successfully installed.
PS D:\Development\DataBase\mysql-8.0.16-winx64\bin>
PS D:\Development\database\mysql-8.0.16-winx64\bin> ./mysql -u root -p
Enter password: ****
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
PS D:\Development\database\mysql-8.0.16-winx64\bin> net start mysql
MySQL 服務(wù)正在啟動(dòng) .
MySQL 服務(wù)已經(jīng)啟動(dòng)成功。
PS D:\Development\database\mysql-8.0.16-winx64\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' for help. Type '\c' to clear the current input statement.
mysql>
參考其他博主文章,找到解決方法:
從8.0.11版本起,不再像mysql5.7及以前版本那樣,設(shè)置用戶密碼時(shí)默認(rèn)的驗(yàn)證方式為caching_sha2_password,如果發(fā)現(xiàn)升級(jí)mysql8.0.11后原有的程序不能連接mysql,可迅速在mysql command line client客戶端用下面的命令設(shè)置成mysql5.7及以前版本的密碼驗(yàn)證方式,同時(shí)MYSQL8.0.11下修改密碼的方式與原先也不大一樣,原先的部分修改密碼的命令在mysql8.0.11下不能使用。
use mysql
ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘你的密碼’;
FLUSH PRIVILEGES;
該caching_sha2_password和 sha256_password認(rèn)證插件提供比mysql_native_password插件更安全的密碼加密 ,并 caching_sha2_password提供了比更好的性能sha256_password。由于這些優(yōu)越的安全性和性能特性 caching_sha2_password它是MySQL 8.0首選的身份驗(yàn)證插件,而且也是默認(rèn)的身份驗(yàn)證插件而不是 mysql_native_password。此更改會(huì)影響服務(wù)器和libmysqlclient 客戶端庫(kù);目前來(lái)說(shuō)和經(jīng)常使用的客戶端軟件兼容性不好。