初始化mysql5.7
-- 环境变量
MYSQL_HOME
%MYSQL_HOME%\bin
-- 新增配置文件
my.ini
[mysqld]
port = 3306
basedir = D:/develop/MySQL/mysql-5.7.44-winx64
datadir = D:/develop/MySQL/mysql-5.7.44-winx64/data
max_connections = 200
character-set-server=utf8
default-storage-engine=INNODB
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[client]
default-character-set=utf8
-- 以管理员身份打开 cmd 或 powershell
mysqld –install
mysqld --initialize --user=root --console
-- 输出的最后一行的最后是初始化密码
2024-11-12T05:41:04.867168Z 1 [Note] A temporary password is generated for root@localhost: l)f2orgqKeOd
--
net start mysql
-- 修改初始化密码
mysql -u root -p
l)f2orgqKeOd
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';
mysql> FLUSH PRIVILEGES;
mysql> quit;
mysql -u root -p
原文地址:https://blog.csdn.net/tt5753/article/details/143712437
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!