1、官方网站下载mysql-noinstall-5.1.51-winx64.zip
2、解压到E:\Program Files\MySQL.(路径自己指定)
3、在E:\Program Files\MySQL下新建my.ini配置文件,内容如下:
*****************配置文件开始*********************
# MySQL Server Instance Configuration File
# ----------------------------------------------------------------------
# Generated by the MySQL Server Instance Configuration Wizard
#
#
# Installation Instructions
# ----------------------------------------------------------------------
#
#
# CLIENT SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by MySQL client applications.
# Note that only client applications shipped by MySQL are guaranteed
# to read this section. If you want your own MySQL client program to
# honor these values, you need to specify it as an option during the
# MySQL client library initialization.
#
[client]
port=3306
[mysql]
default-character-set=gbk
# SERVER SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this
# file.
#
[mysqld]
# The TCP/IP Port the MySQL Server will listen on
port=3306
#Path to installation directory. All paths are usually resolved relative to this.
basedir="E:\Program Files\MySQL\"
#Path to the database root
datadir="E:\Program Files\MySQL\Data"
[WinMySQLadmin]
Server="E:\Program Files\MySQL\bin\mysqld.exe"
# The default character set that will be used when a new schema or table is
# created and no character set is defined
default-character-set=gbk
# The default storage engine that will be used when create new tables when
default-storage-engine=INNODB
# Set the SQL mode to strict
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
# The maximum amount of concurrent sessions the MySQL server will
# allow. One of these connections will be reserved for a user with
# SUPER privileges to allow the administrator to login even if the
# connection limit has been reached.
max_connections=100
# Query cache is used to cache SELECT results and later return them
# without actual executing the same query once again. Having the query
# cache enabled may result in significant speed improvements, if your
# have a lot of identical queries and rarely changing tables. See the
# "Qcache_lowmem_prunes" status variable to check if the current value
# is high enough for your load.
# Note: In case your tables change very often or if your queries are
# textually different every time, the query cache may result in a
# slowdown instead of a performance improvement.
query_cache_size=0
# The number of open tables for all threads. Increasing this value
# increases the number of file descriptors that mysqld requires.
# Therefore you have to make sure to set the amount of open files
# allowed to at least 4096 in the variable "open-files-limit" in
# section [mysqld_safe]
table_cache=256
# Maximum size for internal (in-memory) temporary tables. If a table
# grows larger than this value, it is automatically converted to disk
# based table This limitation is for a single table. There can be many
# of them.
tmp_table_size=26M
# How many threads we should keep in a cache for reuse. When a client
# disconnects, the client's threads are put in the cache if there aren't
# more than thread_cache_size threads from before. This greatly reduces
# the amount of thread creations needed if you have a lot of new
# connections. (Normally this doesn't give a notable performance
# improvement if you have a good thread implementation.)
thread_cache_size=8
#*** MyISAM Specific options
# The maximum size of the temporary file MySQL is allowed to use while
# recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE.
# If the file-size would be bigger than this, the index will be created
# through the key cache (which is slower).
myisam_max_sort_file_size=100G
# If the temporary file used for fast index creation would be bigger
# than using the key cache by the amount specified here, then prefer the
# key cache method. This is mainly used to force long character keys in
# large tables to use the slower key cache method to create the index.
myisam_sort_buffer_size=52M
# Size of the Key Buffer, used to cache index blocks for MyISAM tables.
# Do not set it larger than 30% of your available memory, as some memory
# is also required by the OS to cache rows. Even if you're not using
# MyISAM tables, you should still set it to 8-64M as it will also be
# used for internal temporary disk tables.
key_buffer_size=40M
# Size of the buffer used for doing full table scans of MyISAM tables.
# Allocated per thread, if a full scan is needed.
read_buffer_size=64K
read_rnd_buffer_size=256K
# This buffer is allocated when MySQL needs to rebuild the index in
# REPAIR, OPTIMZE, ALTER table statements as well as in LOAD DATA INFILE
# into an empty table. It is allocated per thread so be careful with
# large settings.
sort_buffer_size=256K
#*** INNODB Specific options ***
innodb_data_home_dir="E:\Program Files\MySQL\Data\INNODB\"
# Use this option if you have a MySQL server with InnoDB support enabled
# but you do not plan to use it. This will save memory and disk space
# and speed up some things.
#skip-innodb
# Additional memory pool that is used by InnoDB to store metadata
# information. If InnoDB requires more memory for this purpose it will
# start to allocate it from the OS. As this is fast enough on most
# recent operating systems, you normally do not need to change this
# value. SHOW INNODB STATUS will display the current amount used.
innodb_additional_mem_pool_size=2M
# If set to 1, InnoDB will flush (fsync) the transaction logs to the
# disk at each commit, which offers full ACID behavior. If you are
# willing to compromise this safety, and you are running small
# transactions, you may set this to 0 or 2 to reduce disk I/O to the
# logs. Value 0 means that the log is only written to the log file and
# the log file flushed to disk approximately once per second. Value 2
# means the log is written to the log file at each commit, but the log
# file is only flushed to disk approximately once per second.
innodb_flush_log_at_trx_commit=1
# The size of the buffer InnoDB uses for buffering log data. As soon as
# it is full, InnoDB will have to flush it to disk. As it is flushed
# once per second anyway, it does not make sense to have it very large
# (even with long transactions).
innodb_log_buffer_size=1M
# InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and
# row data. The bigger you set this the less disk I/O is needed to
# access data in tables. On a dedicated database server you may set this
# parameter up to 80% of the machine physical memory size. Do not set it
# too large, though, because competition of the physical memory may
# cause paging in the operating system. Note that on 32bit systems you
# might be limited to 2-3.5G of user level memory per process, so do not
# set it too high.
innodb_buffer_pool_size=77M
# Size of each log file in a log group. You should set the combined size
# of log files to about 25%-100% of your buffer pool size to avoid
# unneeded buffer pool flush activity on log file overwrite. However,
# note that a larger logfile size will increase the time needed for the
# recovery process.
innodb_log_file_size=39M
# Number of threads allowed inside the InnoDB kernel. The optimal value
# depends highly on the application, hardware as well as the OS
# scheduler properties. A too high value may lead to thread thrashing.
innodb_thread_concurrency=8
*****************配置文件结束*********************
重点是以下配置,其中datadir的目录名称必须是data,并且好像必须是MySQL目录下的data.之前自己制定了其他目录,一直出现1067的错误。
#Path to installation directory. All paths are usually resolved relative to this.
basedir="E:\Program Files\MySQL\"
#Path to the database root
datadir="E:\Program Files\MySQL\Data"
4、在windows环境变量里加入以下内容(方便执行命令行命令)
新建MYSQL_HOME="E:\Program Files\MySQL\",
在Path里加入%MYSQL_HOME%\bin
5、将mysql注册为windows系统服务。具体操作是在命令行中执行以下命令:
mysqld install MySQL --defaults-file="E:\Program Files\MySQL\my.ini"
移除服务为 mysqld remove
6、第5步成功后,在命令行启动mysql
c:>net start mysql
7、修改root的密码为111111
c:>mysql -uroot
mysql> UPDATE user SET password=PASSWORD("111111") WHERE user='root';
mysql> FLUSH PRIVILEGES;
mysql> QUIT
分享到:
相关推荐
### MySQL免安装版在Windows 64位平台的配置与使用 #### 一、概述 在Windows 64位平台上部署MySQL服务器时,通常有两种方式:一种是传统的安装程序安装方式,另一种则是免安装的方式。本文主要介绍的是后者——...
此文档介绍了在Windows7下,如何安装免安装的mysql。
此“Windows X64 Mysql8.1.0免安装包”为用户提供了一种便捷的方式,无需经过传统安装过程,即可在Windows 64位操作系统上快速启动和运行MySQL服务。以下是关于这个免安装包的一些详细知识: 1. **MySQL 8.1.0版本*...
本文将深入解析如何配置MySQL免安装版,包括下载与解压、环境变量设置、服务安装、以及中文字符集的配置。 ### 1. 下载MySQL免安装版 首先,需访问MySQL官方网站或其他可信赖的资源平台,下载适合当前操作系统的...
### MySQL免安装版配置步骤详解 ...通过以上步骤,您可以轻松地配置MySQL免安装版,并将其集成到日常开发工作中。这种免安装版不仅简化了部署过程,还提高了数据的安全性。希望本文能够帮助您更高效地使用MySQL。
MySQL5.7 免安装版配置是指在 Windows 平台下,使用免安装的方式来配置 MySQL5.7 数据库管理系统。下面是 MySQL5.7 免安装版配置的详细步骤和相关知识点。 一、文件配置 在配置 MySQL5.7 之前,需要先解压缩 MySQL...
根据个人操作系统选择合适的版本,例如 64 位 Windows 系统应下载对应的 64 位 MySQL 免安装包。下载完成后,将其解压至预先选定的位置,例如 `E:\KiFaGongJu\MySQL` 文件夹。 #### 三、配置 my.ini 文件 配置 ...
配置MySQL免安装版,首先你需要创建一个my.ini配置文件。这个文件用于定义MySQL服务器的设置,如端口、数据存储位置等。在my.ini文件中,你可以设置`port`参数来更改默认的3306端口,例如`port=3360`。此外,你还...
这里的“Mysql最新免安装x64版”指的是一个无需传统安装过程的64位MySQL版本,具体为mysql-8.0.12-winx64。这个版本适合于那些希望快速部署MySQL服务而不想经历完整安装步骤的用户。 1. **MySQL概述**: - MySQL是...
1. **操作系统**:本教程适用于Windows 7 64位系统。其他版本的Windows系统(如Windows 10)也可以参考此教程进行操作,但可能存在细微差别。 2. **MySQL ZIP包**:请确保已经从MySQL官方网站下载了MySQL 5.7.9版本...
总之,MySQL 5.6 64位免安装版为Windows用户提供了一种快速部署和管理数据库的途径,但同时也需要注意安全性问题,例如设置强密码和定期备份数据。通过批处理文件自动化安装和卸载过程,使得数据库管理更加便捷。
### MySQL免安装版配置知识点详解 #### 一、MySQL免安装版概述 MySQL免安装版是一种无需通过传统安装程序即可使用的版本,适用于那些希望快速部署MySQL数据库或在受限制环境中运行MySQL的情况。与传统的安装版相比...
本文将详细介绍在Windows 7 64位系统上免安装配置MySQL 5.6.22-winx64的方法。 首先,你需要下载MySQL Community Server 5.6.22的压缩包。这个版本适用于64位Windows操作系统,并且不需要通过传统的安装程序进行...
本压缩包提供的是MySQL5.7.16的免安装版本,适用于Windows操作系统,特别是对于那些不希望进行复杂安装过程或者在没有管理员权限的环境下使用MySQL的用户来说,这是一个理想的选择。 首先,我们来了解一下MySQL5.7...
MySQL ODBC 5.1 Driver 是一个用于连接MySQL数据库的开放数据库连接(ODBC)驱动程序,它允许用户通过标准的ODBC接口访问MySQL数据库,适用于Windows操作系统。这个版本是免安装的,意味着用户可以直接解压使用,...
MySQL Server 5.1.34 迷你绿色免安装免配置版是针对Windows操作系统设计的一款轻量级数据库管理系统,它具有便携式、无需安装和配置的特点,适合于快速搭建临时或测试环境中的数据库服务。这个版本在不牺牲功能的...
本文档旨在详细介绍如何在Windows 7 64位操作系统上配置 MySQL 5.6 的免安装版,并提供初始化配置步骤以及创建新用户的详细方法。通常情况下,在 Windows 下安装 MySQL 需要通过下载安装包来进行安装,但有时候我们...