mysql-8.0.16-winx64 安装
admin
2023-04-16 13:21:16
0

Suggestion [3,General]: 找不到命令 /mysqld.exe,但它确实存在于当前位置。默认情况下,Windows PowerShell 不会从当前位置加
载命令。如果信任此命令,请改为键入“.\/mysqld.exe”。有关详细信息,请参阅 "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>

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 服务正在启动 .
MySQL 服务已经启动成功。

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及以前版本那样,设置用户密码时默认的验证方式为caching_sha2_password,如果发现升级mysql8.0.11后原有的程序不能连接mysql,可迅速在mysql command line client客户端用下面的命令设置成mysql5.7及以前版本的密码验证方式,同时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认证插件提供比mysql_native_password插件更安全的密码加密 ,并 caching_sha2_password提供了比更好的性能sha256_password。由于这些优越的安全性和性能特性 caching_sha2_password它是MySQL 8.0首选的身份验证插件,而且也是默认的身份验证插件而不是 mysql_native_password。此更改会影响服务器和libmysqlclient 客户端库;目前来说和经常使用的客户端软件兼容性不好。

相关内容

热门资讯

凤凰连线:中美新一轮经贸磋商,... 中美双方将在韩国举行第七轮经贸磋商。美方的阵容和日程安排如何?在这轮磋商中有哪些关切?凤凰卫视驻韩国...
知情人士:阿联酋秘密打击伊朗,... 据参考消息援引美国《华尔街日报》网站5月11日报道,多名知情人士透露,阿联酋已对伊朗发动军事打击,令...
美防长称美伊停火协议依然有效 △赫格塞思(资料图)当地时间5月12日,美国国防部长赫格塞思表示,他们针对伊朗问题的所有情况都制定了...
特朗普二度来华,五大博弈看点,... 就在5月11日,外交部官宣了一则重磅消息:应中国邀请,美国总统特朗普将于5月13日至15日开启访华行...
科学家预测:“哥斯拉级”厄尔尼... 科学家近日发出警告,太平洋上空正在形成一种被称为“哥斯拉”级的罕见厄尔尼诺气候模式。有科学家预测,这...
200亿美金估值的可灵,值母公... 文 | 影子备忘录 要说今年科技圈最火的赛道,AI短剧绝对排得上号。一部AI仿真人短剧,3人团队、...
多名中国公民在越南乘机遗失财物... 近日,多名中国公民反映在越乘机过程中财物遗失,中国驻胡志明市总领馆提醒中国公民注意:一、强化防范意识...
电视机尺寸一览表70寸长宽 电视机尺寸一览表70寸长宽:一般液晶电视显示屏都是16比9,70寸就是说客它对角线长70寸是106....
东莞一社区推出生育奖励方案,二... 极目新闻记者 柳之萌近日,广东东莞万江街道谷涌社区出台生育奖励方案,对符合条件的二孩家庭一次性奖励1...
80寸液晶电视尺寸长宽多少厘米 80寸液晶电视尺寸长宽多少厘米:80寸的液晶电视大概为181x111厘米,即长度大概在181厘米,宽...