Install MySQL 5.6 decompressed and windows7mysql in Windows 7

Source: Internet
Author: User

Install MySQL 5.6 decompressed and windows7mysql in Windows 7

Tools/Raw Materials

Win7 Operating System

Installation Package in MySQLzip format

Method/step

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.

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.

After completing the preceding steps, many users start to use MySQL, but the following figure shows an error. 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)

After configuring the environment variables, do not start mysql. We also need to modify the configuration file (if there is no configuration, the following errors will occur during startup! : 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)

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

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.

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

END

Notes

The encoding of the my. ini file must be an English code (such as ANSI in windows), not a UTF-8 or GBK.

Modify the root password:

1.> use myql;

2.> update mysql. user set password = password ('root') where user = 'root ';

3. flush privileges;

4.> exit; after logging out, the new password is required when you log on again.

Ram Files (x86) \ Common Files \ Microsoft Shared \ MSEnv \ TextMgrP. dll

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.