初始化、安装mysqld服务,修改root密码: a. 以管理员身份打开cmd.exe,进入到D:\tools\mysql-8.0.25-winx64\bin路径下,执行:
# 初始化mysql.ini中配置的数据目录,执行安装命令添加到系统服务中 mysqld --initialize mysqld -install net start mysql --打开服务
b. 修改数据库密码,上述步骤执行完成在D:\tools\mysql-8.0.25-winx64\data文件夹下有一个以 XXXX.err 结尾文件,打开文件可以看到”A temporary password is generated for root@localhost: xxxxxx“, "xxxxxx"即为临时密码,使用临时密码连接数据库对root密码进行修改,具体步骤如下:
mysql -uroot -p密码 --'-p'与密码之间不要有空格 SET PASSWORD = “新密码”; ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER; --设置密码不过期 flush privileges; --刷新权限
Irish budget airline Ryanair announced plans to significantly increase its route network from Frankfurt Airport, marking a direct challenge to Lufthansa, Germany's leading carrier. ...
[详细]