关于mysql-5.7.9-winx64以及其他系列安装的问题解决
来源:互联网 发布:java输出换行代码 编辑:程序博客网 时间:2024/06/06 07:27
官网下载的mysql5.7 没有data目录,需要初始化一下。
我的步骤如下(使用的mysql-5.7.9):
1、修改my.ini,配置好data目录,放到bin路径 下:
我的步骤如下(使用的mysql-5.7.9):
1、修改my.ini,配置好data目录,放到bin路径 下:
min.ini文件 :
-------------------------------------------------------------------
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.
[mysqld]
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
innodb_buffer_pool_size = 128M
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
# These are commonly set, remove the # and set as required.
basedir =D:\Program Files\MySQL\MySQL Server 5.7
datadir =D:\Program Files\MySQL\MySQL Server 5.7\data
port =3306
# server_id = .....
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 512M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
----------------------------------------------------------------------------------------------
2、执行:mysqld --initialize --user=mysql --console
会自动生成data目录,还有一个随机密码,记下来。
3、执行:mysqld --console 启动mysql,登录mysql -uroot -p 输入刚才记录的密码,执行:set password = password('root')修改密码。
4/杀掉mysqld进程。
安装服务,执行:mysqld --install MySQL --defaults-file="E:\mysql-5.7.9-winx64\my.ini" 自动修改路径 。
net start mysql
ok!
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.
[mysqld]
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
innodb_buffer_pool_size = 128M
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
# These are commonly set, remove the # and set as required.
basedir =D:\Program Files\MySQL\MySQL Server 5.7
datadir =D:\Program Files\MySQL\MySQL Server 5.7\data
port =3306
# server_id = .....
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 512M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
----------------------------------------------------------------------------------------------
2、执行:mysqld --initialize --user=mysql --console
会自动生成data目录,还有一个随机密码,记下来。
3、执行:mysqld --console 启动mysql,登录mysql -uroot -p 输入刚才记录的密码,执行:set password = password('root')修改密码。
4/杀掉mysqld进程。
安装服务,执行:mysqld --install MySQL --defaults-file="E:\mysql-5.7.9-winx64\my.ini" 自动修改路径 。
net start mysql
ok!
*********************************************************
问题:
输入net start mysql时如果出现的问题:
-------------------------------------------------------------------
C:\Windows\system32>net start mysql
MySQL 服务正在启动 .
MySQL 服务无法启动。
MySQL 服务正在启动 .
MySQL 服务无法启动。
服务没有报告任何错误。
请键入 NET HELPMSG 3534 以获得更多的帮助。
-------------------------------------------------------------------
在mysql根目录下要配置一个my.ini文件其中有一项为:
datadir =
后面需要加一个根目录下的data文件的路径;
问题就出在这!!!!!!
有的人是自己新建一个data文件然而会出现如上错误;
并且当你输入 mysqld --console查看日志文件时会发现有好多错误;
解决方法:
要先用mysqld --initialize 先初始化data目录,你会发现data文件生成了,并且里面还多了好多文件,(并不像我们刚建自己建立的那个data文件夹那样空空如也);、
再去运行net start mysql 就可以正常启动了;
0 0
- 关于mysql-5.7.9-winx64以及其他系列安装的问题解决
- MySQL免安装版本(mysql-5.7.19-winx64)的下载以及安装(win10)
- mysql-5.7.13-winx64的安装
- mysql-5.7.17-winx64的安装配置
- MySql-5.7.17 -winx64的安装配置
- mysql-5.7.17-winx64的安装配置
- MySql-5.7.17 -winx64的安装配置
- MySql-5.7.17 -winx64的安装配置
- mysql-5.7.17-winx64的安装问题
- mysql-5.7.16-winx64的安装教程
- MySql-5.7.17 -winx64的安装配置
- MySql-5.7.17 -winx64的安装配置
- mysql-5.7.17-winx64的安装配置
- mysql-5.7.9-winx64解压安装
- 安装mysql-5.7.14-winx64
- 安装mysql-5.7.15-winx64
- mysql-5.7.15-winx64安装
- mysql-5.7.17-winx64安装
- Gson-----1、JSON简介
- 南大软院大神养成计划——关于DreamweaverCS6的一些基本使用方法
- LeetCode题解——Path Sum
- HashMap的工作原理
- HIHO_Disk Storage
- 关于mysql-5.7.9-winx64以及其他系列安装的问题解决
- C#读取配置(App.config)
- 关于Java代码中一个方法代码超出65535字节详解
- 日经春秋 20151117
- android动画
- HDU 1754 I hate it
- Gson-----2、使用GSON读取JSON数据
- Centos 7 下安装hadoop 2.6.x
- 15-11-17 关键字