mysql5.7压缩版初始化

本文详细介绍了如何初始化MySQL5.7压缩版数据库,包括使用mysqld命令创建数据库目录,设置初始密码,安装并启动mysql服务,以及登录和重置root用户的密码。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

初始化数据库目录

mysqld --initialize --user=mysql --console

mysql\mysql-5.7.13-winx64\bin>mysqld --initialize --user=mysql --console
2017-01-16T14:59:06.283684Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-01-16T14:59:06.283684Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2017-01-16T14:59:06.283684Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2017-01-16T14:59:06.965045Z 0 [Warning] InnoDB: New log files created, LSN=45790
2017-01-16T14:59:07.129900Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2017-01-16T14:59:07.238839Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 54352566-dbfc-11e6-baa7-00155d016902.
2017-01-16T14:59:07.267716Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2017-01-16T14:59:07.275715Z 1 [Note] A temporary password is generated for root@localhost: ak*09TS/of:4

ak*09TS/of:4:初始化密码


初始化mysql服务

mysqld --install MySQL

启动mysql服务

net start mysql

登录mysql

mysql -uroot -p

重置密码

set password for root@localhost = password('taofangt168');

完成

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值