MySQL5.6免安装版环境配置图文教程_MySQL
MySQL是一个小巧玲珑但功能强大的数据库,目前十分流行。但是官网给出的安装包有两种格式,一个是msi格式,一个是zip格式的。很多人下了zip格式的解压发现没有setup.exe,面对一堆文件一头雾水,不知如何安装。下面小编将介绍如何解决此情况下安装过程中的各种问题
工具:
win7操作系统
MySQLzip格式安装包
方法/步骤:
MySQL安装文件分为两种,一种是msi格式的,一种是zip格式的。如果是msi格式的可以直接点击安装,按照它给出的安装提示进行安装(相信大家的英文可以看懂英文提示),一般MySQL将会安装在C:\Program Files\MySQL\MySQL Server 5.6 该目录中;zip格式是自己解压,解压缩之后其实MySQL就可以使用了,但是要进行配置。
解压之后可以将该文件夹改名,放到合适的位置,个人建议把文件夹改名为MySQL Server 5.6,放到C:\Program Files\MySQL路径中。当然你也可以放到自己想放的任意位置。
完成上述步骤之后,很多用户开始使用MySQL,但会出现图示的错误。这是因为没有配置环境变量所致。
配置环境变量很简单:
我的电脑->属性->高级->环境变量
选择PATH,在其后面添加: 你的mysql bin文件夹的路径 (如:C:\Program Files\MySQL\MySQL Server 5.6\bin )
PATH=.......;C:\Program Files\MySQL\MySQL Server 5.6\bin (注意是追加,不是覆盖)
配置完环境变量之后先别忙着启动mysql,我们还需要修改一下配置文件(如果没有配置,之后启动的时候就会出现图中的错误哦!:错误2 系统找不到文件),mysql-5.6.1X默认的配置文件是在C:\Program Files\MySQL\MySQL Server 5.6\my-default.ini,或者自己建立一个my.ini文件,
在其中修改或添加配置(如图):
[mysqld]
basedir=C:\Program Files\MySQL\MySQL Server 5.6(mysql所在目录)
datadir=C:\Program Files\MySQL\MySQL Server 5.6\data (mysql所在目录\data)
以管理员身份运行cmd(一定要用管理员身份运行,不然权限不够),
输入:cd C:\Program Files\MySQL\MySQL Server 5.6\bin进入mysql的bin文件夹(不管有没有配置过环境变量,也要进入bin文件夹,否则之后启动服务仍然会报错误2)
输入mysqld -install(如果不用管理员身份运行,将会因为权限不够而出现错误:Install/Remove of the Service Denied!)
安装成功
安装成功后就要启动服务了,继续在cmd中输入:net start mysql(如图),服务启动成功!
此时很多人会出现错误,请看注意:
注意:这个时候经常会出现错误2和错误1067。
如果出现“错误2 系统找不到文件”,检查一下是否修改过配置文件或者是否进入在bin目录下操作,如果配置文件修改正确并且进入了bin文件夹,需要先删除mysql(输入 mysqld -remove)再重新安装(输入 mysqld -install);
如果出现错误1067,那就是配置文件修改错误,确认一下配置文件是否正确。
服务启动成功之后,就可以登录了,如图,输入mysql -u root -p(第一次登录没有密码,直接按回车过),登录成功!
注意事项:
my.ini文件的编码必须是英文编码(如windows中的ANSI),不能是UTF-8或GBK等。
以上就是MySQL5.6免安装版环境配置图文教程_MySQL的内容,更多相关内容请关注PHP中文网(www.php.cn)!

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

Win11 system is the latest Windows operating system, and users may encounter some configuration problems when using it. Among them, configuring Python environment variables is a common requirement because it allows users to easily use Python commands from any location. This article will introduce how to configure Python environment variables in Win11 system so that users can use the Python programming language more conveniently. 1. [Right-click] this computer on the desktop, and select [Properties] in the menu item that opens; 2. Then, under related links, find and click [Advanced System Settings]; 3. In the system properties window, click [Environment] at the bottom Variables]; 4. In the environment variables window, under system variables, select [Path], and then click

Go language is a statically typed, compiled programming language developed by Google. It has a unique position among modern programming languages and is widely used in cloud computing, network programming, big data and other fields. As the Go language becomes more and more popular, more and more programmers are beginning to learn the Go language, hoping to master the features and application skills of this language. However, for learners with zero foundation, the environment configuration of Go language often becomes the first obstacle to their learning. Before learning the Go language, we first need to build a suitable

As an open source programming language, Go language is favored by more and more developers. Its simplicity, efficiency and cross-platform nature have been widely praised. Before learning and using the Go language, you first need to configure the environment in order to carry out development work smoothly. This article will provide you with a comprehensive Go language environment configuration guide and teach you step by step how to set up a development environment so that you can easily get started with Go language development. 1. Install Go language First, we need to download and install the latest version of Go language. You can find it on the Go official website

PyCharm is an integrated development environment (IDE) commonly used by many Python developers. It provides a wealth of functions and tools to facilitate developers to write, debug and test Python code efficiently. Before using PyCharm for development, an important step is to configure the PyCharm environment. This article will provide Python developers with a PyCharm environment configuration guide, including installing PyCharm, configuring the Python interpreter, setting up a virtual environment, etc. It will also come with tools.

Maven environment configuration tutorial: Quick start configuration steps Maven is a powerful project management tool that can help developers automatically build projects, manage dependencies, execute tests, etc. When learning and using Java development, configuring the Maven environment is an essential skill. This article will introduce you to how to quickly configure the Maven environment, including a series of steps such as installing Maven, configuring environment variables, creating projects, etc., and provide specific code examples to help you better understand. Step 1: Download and install Mave

With the rapid development of the Internet, developers' tasks have also become diverse and complex. Especially for PHP language developers, one of the most common problems faced during the development process is the error of data inconsistency between the development environment and the production environment. Therefore, how to handle these errors is an important issue that developers must face when developing PHP applications. The difference between development environment and production environment The first thing to make clear is that development environment and production environment are different, and they have different settings and configurations. in development environment

Mac computers are the favorite working platform of many developers, and Golang, as an efficient programming language, is also loved by more and more people. This article will introduce in detail how to configure and install the Golang development environment on a Mac computer, and provide specific code examples to help readers quickly get started and develop using Golang. Step 1: Download the Golang installation package. First, we need to download the Golang installation package from the official Golang website (https://golang.org/dl/).

How to solve the environment configuration problem in C++ development C++ is a high-level programming language widely used in system software, game development and other fields. When developing in C++, it is very important to correctly configure the development environment. However, due to the complexity of C++ and different operating system platforms, environment configuration issues often plague developers. In this article, we will introduce some methods to solve environment configuration problems in C++ development. First of all, before starting C++ development, you must first determine the IDE (Integrated Development Environment) required for development. Head
