How to install and uninstall the MySQL service under Windows (MySQL 5.6 Zip version installation tutorial) _mysql

Source: Internet
Author: User

MySQL is a small but powerful database, is now very popular. But the official website gives the installation package to have two kinds of formats, one is the MSI format, one is the zip format. Many people under the ZIP format decompression found no Setup.exe, face a heap of file confused, do not know how to install. The following article describes how to resolve various problems during installation in this case.

A simpler step:

Above the Win2003 and win2008 R2 versions:

Unzip the downloaded MySQL to the specified directory (e.g., d:\mysql)
Installation Services
Entering at the command line
D:\mysql\bin\mysqld-install
net start MySQL
Uninstall Service
Entering at the command line
net stop MySQL
D:\mysql\bin\mysqld-remove

MySQL 5.6 Decompression Version Installation tutorial

Install MySQL as a service
Open a Cmd.exe, the directory to switch to D:\MySQL-5.6.13\bin, run: Mysqld-install, prompt service installation success! Run Services.msc A look, there really is a service named MySQL that starts it up.

By this, MySQL5.6.13 has been able to use the normal.
under the Win2000
Installation Services
Entering at the command line
D:\MySQL\bin\mysqld-nt-install
net start MySQL
Uninstall Service
Entering at the command line
net stop MySQL
D:\mysql\bin\mysqld-nt-remove
or directly edit into a bat file double click Execute

Win7 or win2008 R2 server System mysqlzip format installation package

1, the MySQL installation file is divided into two types, one is MSI format, one is in the zip format. If the MSI format can be directly clicked on the installation, according to the installation prompts it gave to install (I believe everyone can read English in English prompts), the general MySQL will be installed in the C:\Program files\mysql\mysql Server 5.6 in this directory Zip format is to extract, after decompression in fact, MySQL can be used, but to configure.

2, after decompression can be renamed the folder, put to the appropriate location, personal suggestions to rename the folder to MySQL Server 5.6, placed in the C:\Program files\mysql path. Of course, you can also put yourself in any position you want to put.

3, after the completion of the above steps, many users began to use MySQL, but there will be a graphical error. This is because the environment variables are not configured. Configuring environment variables is simple:

My Computer-> Properties-> Advanced-> Environment variables

Select Path, after which you add: your MySQL Bin folder paths (such as: C:\Program files\mysql\mysql Server 5.6\bin)

Path= ...; C:\Program files\mysql\mysql Server 5.6\bin (note is append, not overwritten)

4, after the configuration of environment variables do not busy to start MySQL, we also need to modify the configuration file (if not configured, after the launch will appear in the error of the map! : Error 2 system cannot find file, mysql-5.6.1x default profile is C:\Program files\mysql\mysql Server 5.6\my-default.ini, or create a My.ini file yourself.

In which you modify or add a configuration (figure):

[Mysqld]

Basedir=c:\program files\mysql\mysql Server 5.6 (directory where MySQL resides)

Datadir=c:\program files\mysql\mysql Server 5.6\data (MySQL directory \data)

5, as an administrator to run cmd (be sure to run as an administrator, or not enough authority),

Input: cd C:\Program files\mysql\mysql Server 5.6\bin into the MySQL Bin folder (regardless of whether the environment variable has been configured, also enter the Bin folder, otherwise the start service will still report error 2)

Enter Mysqld-install (if you do not run as an administrator, there will be an error due to insufficient permissions: Install/remove of the Service denied!)

Installation Successful

6, after the installation of a successful start service, continue to enter in cmd: net start MySQL (figure), Service start success!

At this point many people will be wrong, please see note:

Note: Error 2 and error 1067 are often present at this time.

If the error 2 system does not find a file, check to see if the profile has been modified or if the configuration file has been modified and entered the Bin folder, you need to remove MySQL (input mysqld-remove) before reinstalling (enter Mysqld- Install);

If error 1067 occurs, the profile modification error confirms that the configuration file is correct.

7, after the successful launch of the service, you can log in, such as the figure, input Mysql-u root-p (the first login without password, directly by the return), login success!

Attention matters

My.ini files must be encoded in English (such as ANSI in Windows), not UTF-8 or GBK.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.