MySQL installation under Windows

Source: Internet
Author: User

The MySQL installation under Windows is divided into installation files (installed with Windows install), and one way to register a service through Windows (or not to register a service). You start and close each time you go through the Windows System DOS window through Mysqld,mysqldadmin. So the registration of the service equivalent to the EXE program and path encapsulated in the service, in addition to the service can also be conveniently defined as boot on the start). In short, there are two ways to install.

If the first installation is recommended to download the installation on the MySQL official web containing install, this is the equivalent of a fool-like operation, generally do not encounter any obstacles.

It is also easier to register the service in Windows if you unzip it in a compressed package. It's easy to have some pitfalls (I've met several, more tragic):

1, official Web download compression package version of MySQL (used on personal computers, so I chose the MySQL version of community);

2. Unzip the package into a directory and then register the service: Under Windows DOS window, CD to the bin directory of the extracted directory of MySQL, run Mysqld-install. Will register for a MySQL service. The service can be seen under the Windows service, indicating that the registration service was successful;

(Trap one: This time I changed my mind, the extracted files have changed a directory.) This caused me to follow up the previous registration of the MySQL service is always a strange error

So: Once the service is registered, if there are any changes to the file directory, you can simply run Sc-delete MySQL in a DOS window, delete the registered Windows service and re-register it to the new directory.

3. After the registration service is successful, you can start the service under the DOS window: net start MySQL (the registered service name is called MySQL by default);

4, then you can enter the MySQL operation: MySQL (other parameters can not be entered, many online)

(Trap II: Because of my first problem, I use the process, the connection to the MySQL server when there are 1066 and 1067 error

There are a lot of answers on the net, I find basically can not solve the problem. And I found some misleading online, as follows:

About Net START MYSQL 1067: Basically there is a problem with the data directory configuration, In the directory of DataDir configuration in My.ini, if you are not in the configuration file after unpacking the data default directory, you should be careful to copy the contents of the directory into the new directory you configured (in addition, about the 1067 error there may be other reasons, for details, please refer to http:// dev.mysql.com/doc/refman/5.6/en/windows-troubleshooting.html);

Misunderstanding three: About My.ini in Windows I use the MySQL 5.6 version is not necessarily required, I estimate that other versions do not necessarily need. Because this file is an optional file, just for us to do some optimization of MySQL, such as memory allocation;

)。

Summarize key points:

1, it is recommended that if you want to use fast for the first time, you can install it using Windows install. In the official website to download the time to divide clearly;

2, the use of non-install installation time:

(1) See online Someone said My.ini must be ASCII encoding, otherwise easy to start error, which is a misleading. Because I do not verify this, but also on the MySQL official website i specifically read the full installation instructions, did not see such a request;

(2) Either way, MySQL installation must be installed with Windows Administrator privileges (although MySQL itself does not require this permission, but when the registration is required);

(3) It is strongly recommended not to look at the installation instructions on the Internet, because the basic operation of the class, the official website has been very detailed. Go to the official website to see (probably also is 15 minutes to read http://dev.mysql.com/doc/refman/5.7/en/windows-installation.html);

(4) The My.ini file is not required. My.ini files (can also be named my.conf) placed in the decompression directory or (%windir% directory can be, then the DOS window echo%windir% see the specific directory). The default priority is to read the%win_dir% directory;

MySQL installation under Windows

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.