在 windows 上安装免安装版的mysql
在 windows 上安装免安装版的
1、 下载路径 https://downloads.mysql.com/archives/community/
2、 解压
假设解压后的路径为:E:\Environment\mysql-5.6.30-winx64
在path环境变量下加入:E:\Environment\mysql-5.6.30-winx64\bin
3、复制 my-default.ini ,生成 my.ini
在 [mysqld] 下面 加入 指定配置
port=3306
character_set_server=utf8
basedir=E:\Environment\mysql-5.6.30-winx64
datadir=E:\Environment\mysql-5.6.30-winx64\data
完整my.ini 文件如下
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/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 = .....
# datadir = .....
# port = .....
# 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 = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
[client]
port=3306
default-character-set=utf8
[mysqld]
port=3306
character_set_server=utf8
#character_set_server=utf8 一定要这样写;
basedir=E:\Environment\mysql-5.6.30-winx64
#解压目录
datadir=E:\Environment\mysql-5.6.30-winx64\data
#解压目录下data目录,必须为data目录
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
4、注册windows系统服务
将mysql注册为windows系统服务
操作如下:
1)从控制台进入到MySQL解压目录下的 bin 目录下:
2)输入服务安装命令:
mysqld install MySQL --defaults-file="D:\Program Files\MySQL\mysql-5.6.16-win32\my.ini"
解压目录下修改的my.ini文件
安装成功后会提示服务安装成功。
注:my.ini文件放在MySQL解压后的根目录下
移除服务命令为:mysqld remove
5、启动MySQL服务
方法一:
启动服务命令为:net start mysql
若报错:MySQL 服务无法启动 1067错误;查看data目录下的err文件看错误:
2014-02-27 10:50:12 5360 [ERROR] InnoDB: .\ibdata1 can't be opened in read-write mode
2014-02-27 10:50:12 5360 [ERROR] InnoDB: The system tablespace must be writable!
2014-02-27 10:50:12 5360 [ERROR] Plugin 'InnoDB' init function returned error.
2014-02-27 10:50:12 5360 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2014-02-27 10:50:12 5360 [ERROR] Unknown/unsupported storage engine: InnoDB
2014-02-27 10:50:12 5360 [ERROR] Aborting
解决方法:删除data目录下的ib_logfile0和ib_logfile1文件。
再次启动,正常
方法二:
打开管理工具 服务,找到MySQL服务。
通过右键选择启动或者直接点击左边的启动来启动服务。
6、 修改 root 账号的密码
方法一:
刚安装完成时root账号默认密码为空,此时可以将密码修改为指定的密码。如:123456
c:>mysql –u root
mysql>show databases;
mysql>use mysql;
mysql>update user set password=PASSWORD("新密码") where user='root';
mysql>FLUSH PRIVILEGES;
mysql>QUIT
7、设置mysql远程访问:
grant all privileges on . to 'root'@'%' identified by 'root用户的密码' with grant option
8、 安装完成。可以 下载 “Navicat premium ” 来试试 远程连接。
在 windows 上安装免安装版的mysql的更多相关文章
- 在windows上极简安装GPU版AI框架(Tensorflow、Pytorch)
在windows上极简安装GPU版AI框架 如果我们想在windows系统上安装GPU版本的AI框架,比如GPU版本的tesnorflow,通常我们会看到类似下面的安装教程 官方版本 安装CUDA 安 ...
- windows上zend server安装 报The server encountered an internal error or misconfiguration and was unable to complete your request -解决方法 摘自网络
windows上zend server安装完成后报如下错误: Internal Server Error The server encountered an internal error or m ...
- windows上redis的安装和配置
windows上redis的安装和配置 进入到Redis的根目录D:\Programming\Redis\Redis6379\Redis-x64-3.2.100底下操作: 配置文件启动 redis-s ...
- 同“窗”的较量:部署在 Windows 上的 .NET Core 版博客站点发布上线
为了验证 docker swarm 在高并发下的性能问题,周一我们发布了使用 docker-compose 部署的 .net core 版博客站点(博文链接),但由于有1行代码请求后端 web api ...
- 峰回路转:去掉 DbContextPool 后 Windows 上的 .NET Core 版博客表现出色
今天早上,我们修改了博客程序中的1行代码,将 services.AddDbContextPool 改为 services.AddDbContext ,去掉 DbContextPool . 然后奇迹出现 ...
- 在Windows 8.1系统上配置免安装版mysql-5.6.21-winx64
1.到官网上下载MySQL 下载地址为:http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.21-winx64.zip 2.解压文件到D盘 当然你可以 ...
- Mysql在windows下的免安装配置步骤和重新安装的步骤
windows下mysql免安装配置 1. 下载mysql免安装压缩包 下载mysql-5.6.22-winx64.zip 解压到本地D:\mysql-5.6.22-winx64 2. 修改配置文件 ...
- windows上,python安装非官方包,提示error: Unable to find vcvarsall.bat
在windows机器上安装python非官方包,如果环境只是用于开发,不作任何测试的话,最好的解决办法是: 在Linux上pip安装好之后,把python根目录lib/python3.6/site-p ...
- Windows平台配置免安装的MySQL
1.下载 官网下载免安装文件(本文使用的是mysql-5.6.33-win32.zip)解压到E:\MySQL\mysql-5.6.33打开E:\MySQL\mysql-5.6.33\my-defau ...
随机推荐
- 类对象序列化为json串,json串反序列化为类对象
1.类对象序列化为json串: 方法一: class P(object): def __init__(self,name,age,sex): self.name=name self.age=age s ...
- sklearn神经网络分类
sklearn神经网络分类 神经网络学习能力强大,在数据量足够,隐藏层足够多的情况下,理论上可以拟合出任何方程. 理论部分 sklearn提供的神经网络算法有三个: neural_network.Be ...
- day4函数文件操作
一.高效读取文件 1.使用with打开文件,程序运行完后会自动关闭打开的文件 2.修改文件,将文件中的123替换为a(简单粗暴方式) 3.打开两个文件,修改后将旧文件删除,将新文件名字改成旧文件的名称 ...
- 【并查集】Connectivity @ABC049&ARC065/upcexam6492
Connectivity 时间限制: 1 Sec 内存限制: 128 MB 题目描述 There are N cities. There are also K roads and L railway ...
- django之ajax补充
之前的ajax使用都是依据jquery来使用的,本篇会先分析ajax的原生的js代码实现,还有jsonp的介绍和最终使用. 本篇导航: js实现的ajax 同源策略与Jsonp 一.js实现的ajax ...
- SpringBoot读取配置文件(从classpath/file读取yml/properties文件)
一.读取properties文件 使用配置项@PropertySource 二.读取yml文件 启动类添加下面代码: @Bean public static PropertySourcesPlac ...
- StompJS使用文档总结
STOMP即Simple (or Streaming) Text Orientated Messaging Protocol,简单(流)文本定向消息协议,它提供了一个可互操作的连接格式,允许STOMP ...
- [android警告]AndroidManifest.xml警告 Not targeting the latest versions of Android
警告:Not targeting the latest versions of Android; compatibility modes apply.Consider testing and upda ...
- Linux命令行烧录树莓派镜像至SD卡
首先下载镜像压缩包 验证压缩包的未被串改 1 sha1sum 2013-09-25-wheezy-raspbian.zip 对此命令的输出结果和官网给出的SHA-1 Checksum进行比对,如果一致 ...
- 微信内置浏览器submit函数无效的问题
在表单提交button被点击时.触发提交函数,代码例如以下: <form id="frm_photo" enctype="multipart/form-data&q ...