分享更有价值
被信任是一种快乐

windows中Mysql 5.7如何绿色安装

文章页正文上

这篇文章主要介绍了windows中Mysql 5.7如何绿色安装,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。1.1
下载http://dev.mysql.com/downloads/mysql/

下载地址,在下拉框中选择相应的版本1.2
安装下载下来的绿色安装包,直接解压为E:mysql1.3
编辑my.ini文件,将mydefault.ini copy一份出来,就该其中的参数.在mysqld中加入如下内容 basedir=”E:mysql” datadir=”E:mysqldata” port=3306#skip-grant-tablesE:mysqlbin>mysqld –initialize2016-09-06T13:57:01.349392Z 0 [Warni免费主机域名ng] TIMESTAMP with implicit
DEFAULT value isdeprecated. Please use
–explicit_defaults_for_timestamp server option (see documentation for more details).2016-09-06T13:57:01.353393Z 0
[ERROR]
–initialize specified but the data direct

o免费主机域名ry has files in it.
Aborting.

2016-09-06T13:57:01.354393Z 0 [ERROR] Aborting出现了如上错误,是由于之前在
data文件夹中有文件导致的,删掉data下所有的文件,重新执行mysqld.exe –initialize命令okE:mysqlbin>mysqld.exe –initializeE:mysqlbin>mysqld.exe –installService successfully installed.E:mysqlbin>net start mysqlMySQL
服务正在启动
.MySQL
服务已经启动成功。E:mysqlbin>mysql -h localhost -u root -pEnter password: ****ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using
password: YES)1.4修改密码没办法修改密码吧在mysqld下加入skip-grant-tablesE:mysqlbin>net stop mysqlMySQL
服务正在停止.MySQL
服务已成功停止。E:mysqlbin>net start mysqlMySQL
服务正在启动
.MySQL
服务已经启动成功。E:mysqlbin>mysql -u root -pEnter password:Welcome to the MySQL monitor. Commands end with ; or g.Your MySQL connection id is 2Server version: 5.7.14 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 itsaffiliates. Other names may be
trademarks of their respectiveowners.Type ‘help;’ or ‘h’ for help. Type
‘c’ to clear the current input statement.mysql>mysql> update user set
password=password(“mysql”) where user=”root”;ERROR 1054 (42S22): Unknown column
‘password’ in ‘field list’出现这个错误是由于mysql 5.7后password栏位变成authentication_string
mysql> update user set
authentication_string=password(“mysql”) where user=”root”;Query OK, 1 row affected, 1 warning
(0.10 sec)Rows matched: 1 Changed: 1 Warnings: 1mysql> flush privileges;Query OK, 0 rows affected (0.00 sec)mysql> quitBye将my.ini中的skip-grant-tables注释掉,重启mysql服务E:mysqlbin>mysql -h localhost
-u root -pEnter password: *****Welcome to the MySQL monitor. Commands end with ; or g.Your MySQL connection id is 2Server version: 5.7.14Copyright (c) 2000, 2016, Oracle
and/or its affiliates. All rights reserved.Oracle is a registered trademark of
Oracle Corporation and/or itsaffiliates. Other names may be
trademarks of their respectiveowners.Type ‘help;’ or ‘h’ for help. Type
‘c’ to clear the current input statement.mysql> show databases;ERROR 1820 (HY000): You must reset
your password using ALTER USER statement before executing this statement.mysql> alter user
‘root’@’localhost’ identified by ‘mysql’;Query OK, 0 rows affected (0.00 sec)mysql> show databases;+——————–+| Database |+——————–+| information_schema || mysql || performance_schema || sys |+——————–+4 rows in set (0.00 sec)感谢你能够认真阅读完这篇文章,希望小编分享的“windows中Mysql 5.7如何绿色安装”这篇文章对大家有帮助,同时也希望大家多多支持云技术,关注云技术行业资讯频道,更多相关知识等着你来学习!

相关推荐: Linux环境下非root用户离线安装Python及相关库的方法

本篇内容主要讲解“Linux环境下非root用户离线安装Python及相关库的方法”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“Linux环境下非root用户离线安装Python及相关库的方法”吧!没有Root权限…

文章页内容下
赞(0) 打赏
版权声明:本站采用知识共享、学习交流,不允许用于商业用途;文章由发布者自行承担一切责任,与本站无关。
文章页正文下
文章页评论上

云服务器、web空间可免费试用

宝塔面板主机、支持php,mysql等,SSL部署;安全高速企业专供99.999%稳定,另有高防主机、不限制内容等类型,具体可咨询QQ:360163164,Tel同微信:18905205712

主机选购导航云服务器试用

登录

找回密码

注册