Windows 7系统下MysQL 5.7.17 简易安装
2017-02-08 22:56
387 查看
白驹过隙,一晃,马上25的人了。是时候积累一点东西了,从点滴开始,希望自己能坚持,加油!
今天说MySQL安装,说一种,另一种未尝试。
1、从MySQL获取压缩文件(*.zip)
2、解压到自定义目录,如:D:\MySql
3、修改bin目录同级的my-default.ini文件,主要是设置几个必须参数。如:
# These are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
# port = .....
# server_id = .....
basedir = D:\MySql
datadir = D:\MySql\data
port = 3306
server_id = mysql57
4、设置系统的环境变量,根据自己的MySQL目录而定。如:
;D:\MySql\bin (环境变量之间“;”分割,一定要注意)
5、进入cmd安装MySQL。命令:mysqld --initialize --user=root --console
正常执行会打印如下信息,这些信息中一定要记录下,随机生成的root的密码(我的root是Hk_r5hy%j#Oz)
2017-02-08T14:26:30.019744Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is
deprecated. Please use --explicit_defaults_for_timestamp server option (see doc
umentation for more details).
2017-02-08T14:26:32.704898Z 0 [Warning] InnoDB: New log files created, LSN=45790
2017-02-08T14:26:33.308933Z 0 [Warning] InnoDB: Creating foreign key constraint
system tables.
2017-02-08T14:26:33.444940Z 0 [Warning] No existing UUID has been found, so we a
ssume that this is the first time that this server has been started. Generating
a new UUID: 97282fa5-ee0a-11e6-a919-00ff77f97c57.
2017-02-08T14:26:33.536946Z 0 [Warning] Gtid table is not ready to be used. Tabl
e 'mysql.gtid_executed' cannot be opened.
2017-02-08T14:26:33.556947Z 1 [Note] A temporary password is generated for root@
localhost: Hk_r5hy%j#Oz
6、启动MySQL服务,命令:net start mysql
如果,启动时提示 “发生系统错误 2”,则需要进入MySQL的bin目录,
6、1 移除已初始化的MySQL,命令:mysqld -remove
6、2 重新初始化MySQL,命令:mysqld -install
初始化完成后,重新启动MySQL服务
7、登录MySQL,命令:mysql -u root -p 回车后,提示输入密码,这时需要输入上面产生的随机密码
8、修改root用户密码,这个方法很多,我用的如下命令。登录MySQL后执行
格式:mysql> set password for 用户名@localhost = password('新密码');
例子:mysql> set password for root@localhost = password('123');
今天说MySQL安装,说一种,另一种未尝试。
1、从MySQL获取压缩文件(*.zip)
2、解压到自定义目录,如:D:\MySql
3、修改bin目录同级的my-default.ini文件,主要是设置几个必须参数。如:
# These are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
# port = .....
# server_id = .....
basedir = D:\MySql
datadir = D:\MySql\data
port = 3306
server_id = mysql57
4、设置系统的环境变量,根据自己的MySQL目录而定。如:
;D:\MySql\bin (环境变量之间“;”分割,一定要注意)
5、进入cmd安装MySQL。命令:mysqld --initialize --user=root --console
正常执行会打印如下信息,这些信息中一定要记录下,随机生成的root的密码(我的root是Hk_r5hy%j#Oz)
2017-02-08T14:26:30.019744Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is
deprecated. Please use --explicit_defaults_for_timestamp server option (see doc
umentation for more details).
2017-02-08T14:26:32.704898Z 0 [Warning] InnoDB: New log files created, LSN=45790
2017-02-08T14:26:33.308933Z 0 [Warning] InnoDB: Creating foreign key constraint
system tables.
2017-02-08T14:26:33.444940Z 0 [Warning] No existing UUID has been found, so we a
ssume that this is the first time that this server has been started. Generating
a new UUID: 97282fa5-ee0a-11e6-a919-00ff77f97c57.
2017-02-08T14:26:33.536946Z 0 [Warning] Gtid table is not ready to be used. Tabl
e 'mysql.gtid_executed' cannot be opened.
2017-02-08T14:26:33.556947Z 1 [Note] A temporary password is generated for root@
localhost: Hk_r5hy%j#Oz
6、启动MySQL服务,命令:net start mysql
如果,启动时提示 “发生系统错误 2”,则需要进入MySQL的bin目录,
6、1 移除已初始化的MySQL,命令:mysqld -remove
6、2 重新初始化MySQL,命令:mysqld -install
初始化完成后,重新启动MySQL服务
7、登录MySQL,命令:mysql -u root -p 回车后,提示输入密码,这时需要输入上面产生的随机密码
8、修改root用户密码,这个方法很多,我用的如下命令。登录MySQL后执行
格式:mysql> set password for 用户名@localhost = password('新密码');
例子:mysql> set password for root@localhost = password('123');
相关文章推荐
- 【MySQL】Windows系统下安装MySQL 5.7.17(安装包方式)
- 安装MySQL 时,系统提示:Cannot create windows service for mysql.error:0
- 安装MySQL 时,系统提示:Cannot create windows service for mysql.error:0
- Windows 7系统安装MySQL5.5.21图解
- Windows 7系统安装MySQL5.5.21图解
- windows64系统中mysql64位绿色安装
- mysql-5.1.37-NOINSTALL版本在Windows系统上的配置安装
- Windows 7系统安装MySQL5.5.21图解
- Windows 7系统安装MySQL5.5.21图解
- Windows 7系统安装MySQL5.5.21图解
- Windows 7系统安装MySQL5.5.21图解
- MySQL5.5.23数据库免安装版本在Windows系统上配置启动
- windows系统中安装多个Mysql服务
- Windows 7系统安装MySQL5.5.21图解
- 安装MySQL 时,系统提示:Cannot create windows service for mysql.error:0
- 安装MySQL 时,系统提示:Cannot create windows service for mysql.error:0
- Windows 7系统安装MySQL5.5.21图解 .
- WIndows系统下安装mysql-noinstall版本
- Windows 7系统安装MySQL5.5.21图解
- Windows 7系统安装MySQL5.5.21图解