win7配置免安装mysql5.6.19过程详解_MySQL
win7
本文主要介绍免安装配置mysql5.6.19的过程,整个过程中自己出现很多次失误,经过整理,现将一次可成功的过程记录下来,供大家参考。
准备
在mysq官网 http://dev.mysql.com/downloads/mysql/,下载最新稳定版本。
本文使用的mysql版本为5.6.19,因下载免安装版本,在页面选择“ Windows (x86, 64-bit), ZIP Archive ”【吐槽一下,越来越大了: 217.2M 】
解压
将下载的mysql.zip解压到E:/Develop/mysql-5.6.19-winx64
创建data目录
创建目录:E:/Develop/TestMysqlData,用于存放mysql的表和数据相关文件。
配置
拷贝mysql解压目录中my-default.ini为test.ini,将basedir、datadir配置为前面的mysql目录和data目录。
并增加编码配置:character_set_server=utf8、character_set_client=utf8
配置完后的文件如下:
basedir = E:/Develop/mysql-5.6.19-winx64datadir = E:/Develop/TestMysqlDatacharacter_set_server=utf8character_set_client=utf8
该地址在test.ini有。
注册服务
通过cmd进入mysq解压目录的bin目录中,执行如下命令:
mysqld install mysqltest --defaults-file="E:/Develop/mysql-5.6.19-winx64/test.ini"【注: mysqltest 为添加的服务名】
若出现如下信息,表明服务安装成功:
启动服务
通过cmd执行命令:
net start mysqltest 【注:此处必须与前面注册时,服务名一致】
按照本教程来执行的话,此时会报错,信息如下:
通过查看data目录,即E:/Develop/TestMysqlData目录下以.err结尾的日志文件,找到报错信息如下:
2014-06-29 15:58:07 9116 [Note] Plugin 'FEDERATED' is disabled.E:/Develop/mysql-5.6.19-winx64/bin/mysqld: Table 'mysql.plugin' doesn't exist2014-06-29 15:58:07 9116 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.2014-06-29 15:58:07 9116 [Note] InnoDB: Using atomics to ref count buffer pool pages
E:/Develop/mysql-5.6.19-winx64/bin>mysql_upgradeLooking for 'mysql.exe' as: E:/Develop/mysql-5.6.19-winx64/bin/mysql.exeLooking for 'mysqlcheck.exe' as: E:/Develop/mysql-5.6.19-winx64/bin/mysqlcheck.exeFATAL ERROR: Upgrade failed
通过net start mysqltest启动服务,依然报错。
此时,将mysql解压目录中的data目录中所有文件拷贝到E:/Develop/TestMysqlData目录中,再启动服务则成功!
E:/Develop/mysql-5.6.19-winx64/bin>net start mysqltestmysqltest 服务正在启动 .mysqltest 服务已经启动成功。
连接数据库
通过workbench连接,打开后可以看到本地已经启动的mysql instance,双击即可直接打开连接。
创建数据库
通过在workbench的sql窗口执行如下脚步,即可创建默认编码为utf-8的数据库。
CREATE DATABASE test DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



InnoDB's full-text search capabilities are very powerful, which can significantly improve database query efficiency and ability to process large amounts of text data. 1) InnoDB implements full-text search through inverted indexing, supporting basic and advanced search queries. 2) Use MATCH and AGAINST keywords to search, support Boolean mode and phrase search. 3) Optimization methods include using word segmentation technology, periodic rebuilding of indexes and adjusting cache size to improve performance and accuracy.

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

Full table scanning may be faster in MySQL than using indexes. Specific cases include: 1) the data volume is small; 2) when the query returns a large amount of data; 3) when the index column is not highly selective; 4) when the complex query. By analyzing query plans, optimizing indexes, avoiding over-index and regularly maintaining tables, you can make the best choices in practical applications.

Yes, MySQL can be installed on Windows 7, and although Microsoft has stopped supporting Windows 7, MySQL is still compatible with it. However, the following points should be noted during the installation process: Download the MySQL installer for Windows. Select the appropriate version of MySQL (community or enterprise). Select the appropriate installation directory and character set during the installation process. Set the root user password and keep it properly. Connect to the database for testing. Note the compatibility and security issues on Windows 7, and it is recommended to upgrade to a supported operating system.

The difference between clustered index and non-clustered index is: 1. Clustered index stores data rows in the index structure, which is suitable for querying by primary key and range. 2. The non-clustered index stores index key values and pointers to data rows, and is suitable for non-primary key column queries.

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.
