Install mysql on 64-bit Windows 7 and mysql on 64-bit Windows 7

Source: Internet
Author: User

Install mysql on 64-bit Windows 7 and mysql on 64-bit Windows 7

Version: mysql official website, download the win7-64 bit mysql Server Installation Package.

Decompress: C: \ Program Files \ mysql \ mysql-5.6.25-winx64.

Configure environment variable: MYSQL_HOME = C: \ Program Files \ mysql \ mysql-5.6.25-winx64, add to Path: % MYSQL_HOME %/bin

Configuration: Change the my-default.ini file name to my. ini and add a line of encoding under [mysqld]: character-set-server = gbk

Add three service startup parameters:

Basedir = C:/Program Files/mysql/mysql-5.6.25-winx64/
Datadir = C:/Program Files/mysql/mysql-5.6.25-winx64/data/
Tmpdir = C:/Program Files/mysql/mysql-5.6.25-winx64/temp/
User = mysql

To install mysql, run the following command:Mysqld -- install MySQL -- defaults-file = "my. ini"

Start mysql with the command: net start MySQL

The error "System Error 2 cannot be started" is reported because the installation is free and the system does not know the configuration file loading path. The system loads a non-existent path by default,

Therefore, you need to change the path to the registry:

HKEY_LOCAL_MACHINE-SYSTEM-CurrentControlSet-services-mysql (Service name)-ImagePath

Lecture value changed to: "C: \ Program Files \ mysql \ mysql-5.6.25-winx64 \ bin \ mysqld" -- defaults-file = "C: \ Program Files \ mysql \ mysql-5.6.25-winx64 \ my. ini" MySQL

Run the command again: net start MySQL. If the parameters are correctly configured and the tmpdir path already exists, the startup is successful;

Otherwise, an error is reported. Modify the parameters and restart.

NOTE: For the data DIRECTORY extracted from the datadir installation package, the tmpdir directory must exist. when mysql is started, it will check whether the directory exists and will not be created automatically.

Start, stop, and uninstall the MySQL Service

Run:

Start:Net start MySQL

Stop:Net stop MySQL

Uninstall:SC delete MySQL



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.