How to install and uninstall the mysql service in windows (mysql 5.6 zip unzip version installation tutorial), mysql5.6

Source: Internet
Author: User

How to install and uninstall the mysql service in windows (mysql 5.6 zip unzip version installation tutorial), mysql5.6

MySQL is a small and exquisite but powerful database, which is very popular at present. However, the official website provides two installation packages: msi and zip. Many people found that there was no setup.exe in zipformat, and they were confused about how to install it in the face of a pile of files. The following describes how to solve various problems during the installation process.

Simple Steps:

Versions later than win2003 and win2008 r2:

Decompress the downloaded mysql file to the specified directory (for example, d: \ mysql)
Install services
Enter
D: \ mysql \ bin \ mysqld-install
Net start mysql
Uninstall Service
Enter
Net stop mysql
D: \ mysql \ bin \ mysqld-remove

Mysql 5.6 decompress version installation tutorial

Install MySQL as a service
Open cmd.exe, switch directory to D: \ MySQL-5.6.13 \ bin, run: mysqld-install, prompt service installation successful! Run services. msc. Check that there is indeed a service named MySQL, and start it.

At this point, MySQL5.6.13 can be used normally.
Under win2000
Install services
Enter
D: \ MySQL \ bin \ mysqld-nt-install
Net start mysql
Uninstall Service
Enter
Net stop mysql
D: \ mysql \ bin \ mysqld-nt-remove
Alternatively, you can directly edit the file as a bat file and double-click it to execute it.

Installation Package in MySQLzip format in win7 or win2008 r2 Server System

1. There are two types of MySQL installation files: msi and zip. If it is in the msi format, you can click Install directly and install it according to the installation prompt provided by it (I believe you can understand the English prompt). Generally, MySQL will be installed in C: \ Program Files \ MySQL Server 5.6 in this directory. the zip format is self-decompressed. After decompression, MySQL can be used, but configuration is required.

2. After decompression, You can rename the folder and place it in the appropriate location. I suggest you rename the folder to MySQL Server 5.6 and put it in the C: \ Program Files \ MySQL path. Of course, you can place it in any location you want.

3. After completing the preceding steps, many users start to use MySQL, but the graphical error may occur. This is because no environment variable is configured. It is easy to configure environment variables:

My computer-> properties-> advanced-> Environment Variables

Select PATH and add the PATH to your mysql bin folder (for example, C: \ Program Files \ MySQL Server 5.6 \ bin)

PATH =...; C: \ Program Files \ MySQL Server 5.6 \ bin (Note: append, Not Overwrite)

4. Do not start mysql After configuring the environment variables. We also need to modify the configuration file (if there is no configuration, the error shown in the figure will appear when the environment variable is started later! : Error 2 system could not find the file), the default mysql-5.6.1X configuration file is in C: \ Program Files \ MySQL Server 5.6 \ my-default.ini, or create a my. ini file,

Modify or add configuration () in it ():

[Mysqld]

Basedir = C: \ Program Files \ MySQL Server 5.6 (mysql directory)

Datadir = C: \ Program Files \ MySQL Server 5.6 \ data (mysql directory \ data)

5. Run cmd as an administrator (Be sure to run it as an administrator; otherwise, the permissions are insufficient ),

Enter cd C: \ Program Files \ MySQL Server 5.6 \ bin to enter the mysql bin folder (whether or not environment variables are configured, enter the bin folder, otherwise, an error will still be reported when the service is started. 2)

Enter mysqld-install (if you do not need to run it as an administrator, the following error will occur due to insufficient permissions: Install/Remove of the Service Denied !)

Installed successfully

6. After the installation is successful, start the service. In cmd, enter net start mysql (). The service starts successfully!

At this time, many people will encounter errors. Please note:

Note: errors 2 and 1067 often occur at this time.

If "Error 2: The system cannot find the file" is displayed, check whether the configuration file has been modified or whether the file is in the bin directory. If the configuration file is modified correctly and the bin folder is displayed, you must first Delete mysql (input mysqld-remove) and then reinstall (input mysqld-install );

If error 1067 is displayed, the configuration file is modified incorrectly. Check whether the configuration file is correct.

7. After the service is successfully started, you can log on. Enter mysql-u root-p (no password for the first login, press Enter!

Notes

The encoding of the my. ini file must be an English code (such as ANSI in windows), not a 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.