search
HomeDatabaseMysql TutorialWindows下安装MySQL5.5.19图文教程_MySQL

  本文详细介绍了Windows下安装MySQL5.5.19的全过程,希望对初学者有帮助。

  下载mysql-5.5.19-win32.msi安装文件,双击运行,出现如下界面。

  

  mysql安装向导启动,按“Next”继续

  在 I accept the terms in the License Agreement(我接受许可协议中的条款)前面打上勾。按“Next”继续。

  选择安装类型,有“Typical(默认)”、“Custom(自定义)”、“Complete(完全)”三个选项,我们选择“Custom”,如图:

在Custom自定义安装中,我们可以选择安装路径,这里我们将MySQL安装到D:/WAMP/MySQL,按“Next”继续。

  点击 “install” 以继续,出现下图界面:

  点击“Next”继续,出现下图:

  将“Launch the Mysql Instance Configuration Wizard(启用MySQL配置向导)”前面的勾打上,然后按 “Finish” 完成安装。

  MySQLl配置向导启动界面,按“Next”继续

  选择配置方式,“Detailed Configuration(手动精确配置)”、“Standard Configuration(标准配置)”,我们选择“Detailed Configuration”,方便熟悉配置过程。

  选择服务器类型,“Developer Machine(开发测试类,MySQL占用很少资源)”、“Server Machine(服务器类型,MySQL占用较多资源)”、“Dedicated MySQL Server Machine(专门的数据库服务器,MySQL占用所有可用资源)”,根据自己的类型选择,我们这里选择第一个,点击“Next”继续。

  MySQL数据库的用途,“Multifunctional Database(通用多功能型)”、“Transactional Database Only(服务器类型,专注于事务处理)”、“Non-Transactional Database Only(非事务处理型,较简单,主要做一些监控、记数用,对MyISAM数据类型的支持仅限于non-transactional),根据你自己的用途 选择就好了,我这里选择”Multifunctional Database”,按“Next”继续。

  对InnoDB Tablespace进行配置,就是为InnoDB 数据库文件选择一个存储空间,如果修改了,要记住位置,重装的时候要选择一样的地方,否则可能会造成数据库损坏,当然,对数据库做个备份就没问题了,这里不详述。使用默认位置就可以了,点击“Next”继续。

  选择您的网站的一般MySQL访问量,同时连接的数目,“Decision Support(DSS)/OLAP(20个左右)”、“Online Transaction Processing(OLTP)(500个左右)”、“Manual Setting(手动设置,自己输一个数)”,由于我们主要在自己机器上做开发测试用,这里选”Manual Setting”,然后选填的是10个连接数,点击“Next"继续。

  是否启用TCP/IP连接,设定端口,如果不启用,就只能在自己的机器上访问mysql数据库,如果启用,把前面的勾打上,Port Number(端口号):3306,“Add firewall exception for this port”是一个关于防火墙的设置,将监听端口加为windows防火墙例外,避免防火墙阻断。还有一项”Enable Strict Mode(启用标准模式)”,如果选中MySQL就不会允许细小的语法错误。如果您还是个新手,我建议您取消标准模式以减少麻烦。但熟悉MySQL以后,尽量使用标准模式,因为它可以降低有害数据进入数据库的可能性。都配置好后,点击“Next”继续。

  对MySQL默认数据库编码进行设置。第一个是西文编码,第二个是多字节的通用utf8编码,第三个你可以在 Character Set 下拉框多种编码中进行自由选择,我们常使用的就是gbk、gb2312和utf8,UTF8是国际编码,它的通用性比较好,GBK是国家编码,通用性比UTF8差,不过UTF8占用的数据库比GBK大,这里根据适合你自己的选择就好了,我选择的是utf8,不过需要注意的 是如果要用原来数据库的数据,最好能确定原来数据库用的是什么编码,如果这里设置的编码和原来数据库数据的编码不一致,在使用的时候可能会出现乱码,点击"Next" 继续。

  是否将MySQL安装为Windows服务,还可以指定Service Name(服务标识名称),是否将MySQL的Bin目录加入到Windows PATH(加入后,就可以直接使用Bin下的文件,而不用指出目录名,比如连接,”mysql.exe -uusername -ppassword;”就可以了,不用指出mysql.exe的完整地址,很方便),我这里全部打上了勾,Service Name不变,按“Next”继续。

  是否要修改默认root用户(超级管理)的密码(默认为空),“New root password”如果要修改,就在此填入新密码,“Confirm(再输一遍)”内再填一次,防止输错。“Enable root access from remotemachines(是否允许root用户在其它的机器上登陆,如果要安全,就不要勾上,如果要方便,就勾上它)”。最后一项“Create An Anonymous Account(新建一个匿名用户,匿名用户可以连接数据库,不能操作数据,包括查询)”,一般就不用勾了,完成后,点击"Next"继续。

  确保你上面的设置无误后,点击Execute,使设置生效,如果有误,按Back返回检查。至此MySQL5安装完毕。

  常见的错误处理:

  1. 安装MySQL最后一步提示 “终结点映射器中没有更多的终结点可用”

  这是因为你在安装MySQL的某一步中勾选了“Add firewall exception for this port”(为防火墙添加例外),但是你的Windows的防火墙或者防火墙服务被你优化关闭了(比如我 就没有开过windows防火墙),所以会有这个提示。一般情况下点击“OK”就好了,不会对系统造成任何影响。  

  2. 安装MySQL最后一步出现 “mysql apply security settings 1045错误”

  此错误通常出现在重装MySQL时,以前的MySQL没有卸载干净。
  除了在控制面板的“添加或删除程序”中卸载MySQL,还要将原来MySql安装路径的关于MySql的全部删除。先前如果有重要数据,可以先做个备份。
  删除C:/Documents and Settings/Administrator/Application Data/MySql文件夹。
  删除C:/Documents and Settings/All Users/Application Data/MySql文件夹。
  注意Application Data是隐藏的目录。

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Explain the InnoDB Buffer Pool and its importance for performance.Explain the InnoDB Buffer Pool and its importance for performance.Apr 19, 2025 am 12:24 AM

InnoDBBufferPool reduces disk I/O by caching data and indexing pages, improving database performance. Its working principle includes: 1. Data reading: Read data from BufferPool; 2. Data writing: After modifying the data, write to BufferPool and refresh it to disk regularly; 3. Cache management: Use the LRU algorithm to manage cache pages; 4. Reading mechanism: Load adjacent data pages in advance. By sizing the BufferPool and using multiple instances, database performance can be optimized.

MySQL vs. Other Programming Languages: A ComparisonMySQL vs. Other Programming Languages: A ComparisonApr 19, 2025 am 12:22 AM

Compared with other programming languages, MySQL is mainly used to store and manage data, while other languages ​​such as Python, Java, and C are used for logical processing and application development. MySQL is known for its high performance, scalability and cross-platform support, suitable for data management needs, while other languages ​​have advantages in their respective fields such as data analytics, enterprise applications, and system programming.

Learning MySQL: A Step-by-Step Guide for New UsersLearning MySQL: A Step-by-Step Guide for New UsersApr 19, 2025 am 12:19 AM

MySQL is worth learning because it is a powerful open source database management system suitable for data storage, management and analysis. 1) MySQL is a relational database that uses SQL to operate data and is suitable for structured data management. 2) The SQL language is the key to interacting with MySQL and supports CRUD operations. 3) The working principle of MySQL includes client/server architecture, storage engine and query optimizer. 4) Basic usage includes creating databases and tables, and advanced usage involves joining tables using JOIN. 5) Common errors include syntax errors and permission issues, and debugging skills include checking syntax and using EXPLAIN commands. 6) Performance optimization involves the use of indexes, optimization of SQL statements and regular maintenance of databases.

MySQL: Essential Skills for Beginners to MasterMySQL: Essential Skills for Beginners to MasterApr 18, 2025 am 12:24 AM

MySQL is suitable for beginners to learn database skills. 1. Install MySQL server and client tools. 2. Understand basic SQL queries, such as SELECT. 3. Master data operations: create tables, insert, update, and delete data. 4. Learn advanced skills: subquery and window functions. 5. Debugging and optimization: Check syntax, use indexes, avoid SELECT*, and use LIMIT.

MySQL: Structured Data and Relational DatabasesMySQL: Structured Data and Relational DatabasesApr 18, 2025 am 12:22 AM

MySQL efficiently manages structured data through table structure and SQL query, and implements inter-table relationships through foreign keys. 1. Define the data format and type when creating a table. 2. Use foreign keys to establish relationships between tables. 3. Improve performance through indexing and query optimization. 4. Regularly backup and monitor databases to ensure data security and performance optimization.

MySQL: Key Features and Capabilities ExplainedMySQL: Key Features and Capabilities ExplainedApr 18, 2025 am 12:17 AM

MySQL is an open source relational database management system that is widely used in Web development. Its key features include: 1. Supports multiple storage engines, such as InnoDB and MyISAM, suitable for different scenarios; 2. Provides master-slave replication functions to facilitate load balancing and data backup; 3. Improve query efficiency through query optimization and index use.

The Purpose of SQL: Interacting with MySQL DatabasesThe Purpose of SQL: Interacting with MySQL DatabasesApr 18, 2025 am 12:12 AM

SQL is used to interact with MySQL database to realize data addition, deletion, modification, inspection and database design. 1) SQL performs data operations through SELECT, INSERT, UPDATE, DELETE statements; 2) Use CREATE, ALTER, DROP statements for database design and management; 3) Complex queries and data analysis are implemented through SQL to improve business decision-making efficiency.

MySQL for Beginners: Getting Started with Database ManagementMySQL for Beginners: Getting Started with Database ManagementApr 18, 2025 am 12:10 AM

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools