mysql-5.7.17-winx64 win10 安装指南 和 修改root 密码
来源:互联网 发布:乐乎亚洲雄风的喜欢 编辑:程序博客网 时间:2024/05/11 06:00
(也许有很多人跟我遇过到同样的问题)
======================================================================================
首先,我是照着这个链接安装的:
http://blog.csdn.net/rebirth_love/article/details/53608483
数据库可以安装成功,但是服务不能启动。
其中评论区有提到,要在第四步执行mysqld --initialize --user=mysql --console 初始化
但是按照他这样做还是不成功,我是装在D盘,D:\mysql-5.7.17-winx64\
首先,如果你不是在D:\mysql-5.7.17-winx64\bin
比如你在cmd 默认目录下执行mysqld --initialize --user=mysql --console ,则会提示: [ERROR] Can't find error-message file 'C:\WINDOWS\system32\%MYSQL_HOME%\share\errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
所以是目录不对,要切到D:\mysql-5.7.17-winx64\bin 目录,但是还是提示: [ERROR] Can't find error-message file 'D:\mysql-5.7.17-winx64\bin\%MYSQL_HOME%\share\%MYSQL_HOME% hare\english\errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
明显目录不对,于是我就把参考链接中的配置脚本上,关于配置目录的全部注释掉,OK ,默认目录都是对的了。成功!
附上操作图片和最后的my.ini 配置脚本。
#########################################################
[client]
port=3306
default-character-set=utf8
[mysqld]
#basedir=%MYSQL_HOME%
#解压目录
#language=%MYSQL_HOME%\share\english
port=3306
character_set_server=utf8
#datadir=%MYSQL_HOME%\data
#解压目录下data目录
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[WinMySQLAdmin]
%MYSQL_HOME%\bin\mysqld.exe
########
==========================分界线=============================================================================================
刚安装好后,按道理是没有root密码的,但是我这就是有密码,而且我还不知道密码,显示如下:
D:\>mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
D:\>mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
处理方法是在my.ini 文件里[mysqld]下面添加一句:skip-grant-tables 顾名思义,数据库启动的时候 跳跃权限表的限制,不用验证密码,直接登录。
net stop MySQL 关闭数据库服务,然后net start MySQL 打开,
这个时候在登录就不需要密码了,显示如下:
D:\>mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.17 MySQL Community Server (GPL)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
======================================================================================
首先,我是照着这个链接安装的:
http://blog.csdn.net/rebirth_love/article/details/53608483
数据库可以安装成功,但是服务不能启动。
其中评论区有提到,要在第四步执行mysqld --initialize --user=mysql --console 初始化
但是按照他这样做还是不成功,我是装在D盘,D:\mysql-5.7.17-winx64\
首先,如果你不是在D:\mysql-5.7.17-winx64\bin
比如你在cmd 默认目录下执行mysqld --initialize --user=mysql --console ,则会提示: [ERROR] Can't find error-message file 'C:\WINDOWS\system32\%MYSQL_HOME%\share\errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
所以是目录不对,要切到D:\mysql-5.7.17-winx64\bin 目录,但是还是提示: [ERROR] Can't find error-message file 'D:\mysql-5.7.17-winx64\bin\%MYSQL_HOME%\share\%MYSQL_HOME% hare\english\errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
明显目录不对,于是我就把参考链接中的配置脚本上,关于配置目录的全部注释掉,OK ,默认目录都是对的了。成功!
附上操作图片和最后的my.ini 配置脚本。
#########################################################
[client]
port=3306
default-character-set=utf8
[mysqld]
#basedir=%MYSQL_HOME%
#解压目录
#language=%MYSQL_HOME%\share\english
port=3306
character_set_server=utf8
#datadir=%MYSQL_HOME%\data
#解压目录下data目录
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[WinMySQLAdmin]
%MYSQL_HOME%\bin\mysqld.exe
########
==========================分界线=============================================================================================
刚安装好后,按道理是没有root密码的,但是我这就是有密码,而且我还不知道密码,显示如下:
D:\>mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
D:\>mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
处理方法是在my.ini 文件里[mysqld]下面添加一句:skip-grant-tables 顾名思义,数据库启动的时候 跳跃权限表的限制,不用验证密码,直接登录。
net stop MySQL 关闭数据库服务,然后net start MySQL 打开,
这个时候在登录就不需要密码了,显示如下:
D:\>mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.17 MySQL Community Server (GPL)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
现在是免密码登录了,修改密码方法待续
mysql> update user set authentication_string=password('123123') where user='root' and Host='localhost'
0 2
- mysql-5.7.17-winx64 win10 安装指南 和 修改root 密码
- mysql-5.7.12-winx64配置和修改root密码的方法
- win10下安装mysql-5.7.19-winx64
- Win10安装mysql-5.7.20-winx64
- mysql-5.7.11-winx64.zip解压缩安装时root的默认密码
- MySQL 5.7.16 Winx64 解压版,首次安装 Root 随机密码如何查找~
- mysql-5.7.11-winx64.zip解压缩安装时root的默认密码
- Mysql数据库mysql-5.7.18-winx64修改密码
- mysql-5.7.17-winx64安装
- win10 64位安装绿色版mysql-5.7.16-winx64
- win10 64位安装绿色版mysql-5.7.16-winx64
- win10 64位安装绿色版mysql-5.7.16-winx64
- win10 64位安装绿色版mysql-5.7.16-winx64
- mysql-5.7.17-winx64免安装版,win10环境下安装配置
- Mysql 5.7.17 winx64免安装版,win10环境下安装配置图文教程
- mysql-5.7.17-winx64免安装版,win10环境下安装配置
- win10环境下安装配置mysql-5.7.17-winx64免安装版
- MYSQL解压缩版本配置安装和控制台修改root密码!
- Springmvc 集成dubbo (非maven形式)
- 选题在线提交系统(html+JS+php)
- 3、用户及组、文件权限,root密码重置、
- IE中打印功能实现
- 一个关于焦点图(轮播图)的插件——myfoucs
- mysql-5.7.17-winx64 win10 安装指南 和 修改root 密码
- elasticsearch5.0.1集群一次误删除kibana索引引发的血案
- C++Primer第五版 第十六章习题答案(1~10)
- 系统调用
- Hibernate框架入门
- tensorflow学习笔记零:新手入门笔记
- 紫书搜索 例题7-10 UVA
- 最长公共子序列LCS
- 第七届蓝桥杯java 冰雹数