加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

win10 安装mysql

发布时间:2020-12-14 02:55:20 所属栏目:Windows 来源:网络整理
导读:现在mysql压缩包:https://downloads.mysql.com/archives/community/ ? ?在目录下新建data文件夹,my.ini文件,内容如下: [mysqld] basedir = F:mysql- 8.0 . 13 - winx64 datadir =F:mysql- 8.0 . 13 - winx64data port = 3306 lower_case_table_names

现在mysql压缩包:https://downloads.mysql.com/archives/community/

?

?在目录下新建data文件夹,my.ini文件,内容如下:

[mysqld] basedir = F:mysql-8.0.13-winx64 datadir =F:mysql-8.0.13-winx64data port = 3306 lower_case_table_names = 2 default_authentication_plugin=mysql_native_password 

?

使用管理员身份打开dos窗口(powershell),执行命令:

 .mysqld --initialize --console

?

复制结果中的密码:

2019-04-01T06:04:04.796850Z 0 [System] [MY-013169] [Server] D:mysql-8.0.14-winx64binmysqld.exe (mysqld 8.0.14) initializing of server in progress as process 12764
2019-04-01T06:04:10.085559Z 5 [Note] [MY-010454] [Server] A temporary password is generated for [email?protected]: 3/3FEF)xPFaZ
2019-04-01T06:04:11.442346Z 0 [System] [MY-013170] [Server] D:mysql-8.0.14-winx64binmysqld.exe (mysqld 8.0.14) initializing of server has completed

?

然后执行安装命令:

 .mysqld --install

?

提示安装成功:

Service successfully installed.

?

接着启动mysql

net start mysql

?

mysql启动成功:

MySQL 服务正在启动 ..
MySQL 服务已经启动成功。

?

最后要修改mysql的密码:

.mysql.exe -uroot -p

?

输入刚才复制的密码,然后修改密码:

 alter user root@localhost identified with mysql_native_password by aaa123;

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读