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

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.

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

分享到:
评论

相关推荐

    Linux安装Mysql5.6教程(手把手教你)

    ### Linux安装Mysql5.6教程(手把手教你) #### 一、前言 随着Linux系统的广泛应用,数据库软件如MySQL也成为了许多项目的基础组件之一。本文将详细介绍如何在Linux环境下安装MySQL 5.6版本,并进行基本配置。无论...

    mysql5.6zip版及安装方法(网盘提取).txt

    根据提供的文件信息,我们可以归纳出以下几个关键知识点: ...通过以上知识点的介绍,相信对于 MySQL 5.6 Zip 版本及其安装方法有了较为全面的了解。正确地安装和配置 MySQL 对于确保数据库应用的稳定运行至关重要。

    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.zip

    MySQL 5.6是MySQL数据库管理...通过解压并安装“mysql5.6.zip”,您可以开始探索和利用它的各种特性和优势。在实际应用中,了解并掌握MySQL的安装、管理、性能优化以及安全实践,对于任何IT专业人士都是至关重要的。

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

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

    mysql5.6离线安装与配置

    1. 访问MySQL官方网站或第三方可信源,下载适用于你操作系统的MySQL 5.6安装包。文件可能以`.msi`(Windows)、`.rpm`(Linux)或`.dmg`(macOS)格式提供。 2. 保存到本地,确保在无网络环境时也能访问到这个文件。...

    mysql5.6安装与卸载.rar

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

    redhat5下mysql5.6的安装与简单维护

    本教程详细介绍了如何在 RedHat 5 系统下安装 MySQL 5.6 以及进行简单的管理和配置。这些步骤包括了从环境准备、安装 MySQL 服务器和客户端、设置初始密码、创建数据库到配置远程访问权限等全过程。通过这些步骤,...

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

    本教程将详细讲解如何在Windows操作系统上安装MySQL 5.6的ZIP格式压缩版。 首先,您需要从MySQL官方网站下载适用于您计算机体系结构的安装包。ZIP格式的安装包不包含图形化安装程序,因此安装过程需要手动配置。...

    MHA实现mysql5.6主从切换安装配置教程.docx

    在本教程中,我们将探讨如何在MySQL 5.6环境中使用MHA进行主从切换的安装和配置。 首先,我们需要安装MHA软件。这涉及到两个主要的组件:`mha4mysql-node` 和 `mha4mysql-manager`。通过 `yum` 命令或直接下载 `rpm...

    centos7安装mysql5.6数据库简单教程-自己总结.DOCX

    这个简单的教程涵盖了从准备环境到安装、配置MySQL 5.6的整个过程。对于初学者来说,这是一个很好的起点,但实际生产环境中可能还需要考虑更多的安全措施和优化策略,例如设置更严格的权限、创建数据库用户、备份...

    mysql5.6安装说明文档(windows系统)

    标题《mysql5.6安装说明文档(windows系统)》所指的知识点包括: 1. MySQL 5.6版本的安装过程,特别指出了操作系统的平台是Windows系统。 2. 安装过程中可能会遇到的问题以及解决方法,包括如果安装不成功,需要...

    Centos7安装Mysql5.6

    本教程将详细介绍如何在 CentOS 7 系统上安装 MySQL 5.6 数据库服务器。整个过程包括下载、上传、解压缩、配置、安装、启动 MySQL 以及解决可能遇到的一些常见问题。 **系统环境**: CentOS 7 (CentOS-7-x86_64-...

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

    在介绍MySQL 5.6的zip包安装教程之前,需要明确安装的准备工作和安装步骤。 准备工作包含下载MySQL 5.6的zip安装包,选择合适版本的压缩文件(例如5.6.42版本的zip压缩包)。下载完成后,解压缩到指定的文件夹中,...

    Centos 6.5下安装MySQL 5.6教程

    在本文中,我们将深入探讨如何在CentOS 6.5操作系统上安装MySQL 5.6。MySQL是一个流行的开源关系型数据库管理系统(RDBMS),它为开发者提供了强大的数据存储和管理能力。下面是安装MySQL 5.6的详细步骤: 1. **...

    MySQL Server 5.6免安装版.zip

    MySQL Server 5.6是MySQL数据库管理系统的一个重要版本,它...总之,MySQL Server 5.6免安装版提供了一种简单快捷的方式来部署和使用MySQL数据库服务,对于开发者和管理员来说,理解和掌握这些核心概念和操作至关重要。

Global site tag (gtag.js) - Google Analytics