`
Lstoryc
  • 浏览: 75425 次
文章分类
社区版块
存档分类
最新评论

MySql 5.6 解压版官方安装教程

阅读更多

 

 

看地址:http://dev.mysql.com/doc/refman/5.6/en/windows-create-option-file.html

 

 

==============================

2.3.5.2 Creating an Option File

If you need to specify startup options when you run the server, you can indicate them on the command line or place them in an option file. For options that are used every time the server starts, you may find it most convenient to use an option file to specify your MySQL configuration. This is particularly true under the following circumstances:

  • The installation or data directory locations are different from the default locations (C:\Program Files\MySQL\MySQL Server 5.6 and C:\Program Files\MySQL\MySQL Server 5.6\data).

  • You need to tune the server settings, such as memory, cache, or InnoDB configuration information.

When the MySQL server starts on Windows, it looks for option files in several locations, such as the Windows directory, C:\, and the MySQL installation directory (for the full list of locations, see Section 4.2.3.3, “Using Option Files”). The Windows directory typically is named something like C:\WINDOWS. You can determine its exact location from the value of the WINDIR environment variable using the following command:

C:\> echo %WINDIR%

MySQL looks for options in each location first in the my.ini file, and then in the my.cnf file. However, to avoid confusion, it is best if you use only one file. If your PC uses a boot loader where C: is not the boot drive, your only option is to use the my.ini file. Whichever option file you use, it must be a plain text file.

Note

When using the MySQL Installer to install MySQL Server, it will create the my.ini at the default location. And as of MySQL Server 5.5.27, the user running MySQL Installer is granted full permissions to this new my.ini.

In other words, be sure that the MySQL Server user has permission to read the my.ini file.

You can also make use of the example option files included with your MySQL distribution; see Section 5.1.2, “Server Configuration Defaults”.

An option file can be created and modified with any text editor, such as Notepad. For example, if MySQL is installed in E:\mysql and the data directory is in E:\mydata\data, you can create an option file containing a [mysqld] section to specify values for the basedir and datadir options:

[mysqld]
# set basedir to your installation path
basedir=E:/mysql
# set datadir to the location of your data directory
datadir=E:/mydata/data

Note that Windows path names are specified in option files using (forward) slashes rather than backslashes. If you do use backslashes, double them:

[mysqld]
# set basedir to your installation path
basedir=E:\\mysql
# set datadir to the location of your data directory
datadir=E:\\mydata\\data

The rules for use of backslash in option file values are given in Section 4.2.3.3, “Using Option Files”.

The data directory is located within the AppData directory for the user running MySQL.

If you would like to use a data directory in a different location, you should copy the entire contents of the data directory to the new location. For example, if you want to use E:\mydata as the data directory instead, you must do two things:

  1. Move the entire data directory and all of its contents from the default location (for example C:\Program Files\MySQL\MySQL Server 5.6\data) to E:\mydata.

  2. Use a --datadir option to specify the new data directory location each time you start the server.

 

User Comments

Posted by Dave Johnson on April 21 2007 2:25pm [Delete] [Edit]

If you have installed mysql using xampp, moving your data directory is not a matter of creating a new option file, but modifying the one used by xampp to start your mysql server.

Look for the batch file mysql_start.bat in the xampp directory. My mysql_start.bat file includes this line:
mysql\bin\mysqld --defaults-file=mysql\bin\my.cnf --standalone --console

By editing the mysql\bin\my.cnf file (that path is relative to the xampp installation directory), I was able to change the default data directory.

==============================

分享到:
评论

相关推荐

    MySQL 5.6从零开始学 视频教学版.haozip01.zip

    MySQL 5.6从零开始学 视频教学版.haozip01.zip MySQL 5.6从零开始学 视频教学版.haozip02.zip MySQL 5.6从零开始学 视频教学版.haozip03.zip MySQL 5.6从零开始学 视频教学版.haozip04.zip 400页

    mysql5.6安装与卸载.rar

    musql5.6绿色纯净版,内附安装与卸载教程; MySQL是一种开放源代码的关系型数据库管理系统(RDBMS),使用最常用的数据库管理语言--结构化查询语言(SQL)进行数据库管理。 MySQL是开放源代码的,因此任何人都可以在...

    MySQL 5.6 解压缩版安装配置方法图文教程(win10)

    主要为大家详细介绍了MySQL for Windows 解压缩版安装配置的相关资料,需要的朋友可以参考下

    windows下安装、卸载mysql服务的方法(mysql 5.6 zip解压版安装教程)

    很多人下了zip格式的解压发现没有setup.exe,面对一堆文件一头雾水,不知如何安装。下面笔者将介绍如何解决此情况下安装过程中的各种问题。 比较简单的步骤: 在win2003及win2008 r2以上版本: 将下载下来的mysql...

    MySQL5.6免安装版环境配置图文教程

    很多人下了zip格式的解压发现没有setup.exe,面对一堆文件一头雾水,不知如何安装。下面小编将介绍如何解决此情况下安装过程中的各种问题 工具: win7操作系统 MySQLzip格式安装包 方法/步骤: MySQL安装文件分为两...

    Mysql5.6修改root密码教程

    一、MySQL5.6安装后,不能正常启用 压缩版MySQL,解压完后在:我的电脑->属性->高级->环境变量 选择PATH,在其后面添加mysql bin文件夹的路径 (如:C:\Program Files\MySQL\MySQL Server 5.6\bin ) 在my-default.ini...

    mysql5.6安装配置方法图文教程

    然而刚刚处理好数据了,就要使用数据库来存放数据了,所以不得不把mysql数据库配备好,因为实在实验室的机器上操作,机器环境的限制吧(装过mysql5.7版本的失败了),所以使用的还是mysql较低的版本mysql5.6,...

    MySQL5.6的zip包安装教程详解

    之前我们都是后缀为.msi的文件,换言之就是傻瓜式安装,但是有些版本不容易控制安装路径,或者数据库编码格式,还有些会安装很多无用的服务,但是都没有后缀为.zip文件简单直接,说是在哪里,就在哪里。 1,首先在...

    银河麒麟v10安装MySQL5.7 含教程

    Linux系统版本:银河麒麟v10 arm MySQL5.7 aarch64 免编译

    linux二进制通用包安装mysql5.6.20教程

    我们使用二进制通用包安装MySQL,这个类似于windows下的绿色软件,解压后配置即可使用,下载地址: https://edelivery.Oracle.com/EPD/Search/handle_go 2.将二进制mysql安装文件解压到/usr/local下,这里使用软...

    Mysql5.7安装教程

    资源名称:Mysql5.7安装教程内容简介: MySQL安装文件分为两种,一种是msi格式的,一种是zip格式的。如果是msi格式的可以直接点击安装,按照它给出的安装提示进行安装(相信大家的英文可以看懂英文提示),一般MySQL...

    Centos 6.5下安装MySQL 5.6教程

    1.下载Linux对应的RPM包 http://dev.mysql.com/downloads/mysql/5.6.html wget ...3.安装MySQL rpm -ivh MySQL-server-5.6.33-1.el6.x86_64.rpm rpm -ivh MySQL-client-5.6.33-1.e

    MySQL 5.6 (Win7 64位)下载、安装与配置图文教程

    其中MSI格式的可以直接点击安装,按照它给出的安装提示进行安装,一般MySQL将会安装在C:\Program Files\MySQL\MySQL Server x.x (x.x是版本号)该目录中;ZIP格式是自己解压,解压缩之后MySQL就可以使用了,但是要...

    MySQL5.6安装图解(windows7/8_64位)

    本文为大家分享了MySQL5.6安装教程,具体内容如下 1. 下载MySQL 2. 解压MySQL压缩包 将以下载的MySQL压缩包解压到自定义目录下。 3. 添加环境变量 变量名:MYSQL_HOME 变量值:D:\mysql-5.6.26-winx64 即为mysql的...

    Windows 8下MySQL Community Server 5.6安装配置方法图文教程

    本文记录了Windows 8下MySQL5.6安装配置教程,分享给大家。 1.1 下载与路径配置 首先先进入官网下载MySQL安装包 选择DOWNLOADS,Community版 下载完后解压 用bin目录的地址添加到环境变量里的路径(Path)里 ...

    Linux下mysql5.6.33安装配置教程

    本教程为大家分享了mysql5.6.33在linux下的安装配置方法,供大家参考,具体内容如下 1、下载 下载地址:http://dev.mysql.com/downloads/mysql/5.6.html#downloads 下载版本:我这里选择的5.6.33,通用版,linux下64...

    mysql5.6.zip格式压缩版安装图文教程

    不过很多人都是下载的是zip格式的安装包,解压却发现没有setup.exe安装程序,所以今天我们介绍的是zip格式的安装教程。 1.首先先下载mysql,进入这个网站下载,往下翻,点击红圈的文字 出现MySQL Community Server ...

    MySQL 5.6.36 Windows x64位版本的安装教程详解

    (1)(解压到当前文件夹方式)解压安装包,编辑其中的my-default.ini文件,主要是2项:  ①basedir即为mysql基础文件夹,形如:C:\mysql-5.6.36-winx64  ②datadir,即为mysq数据文件夹,形如:C:\mysql-5.6.36-...

Global site tag (gtag.js) - Google Analytics