Install MySQL_MySQL using the noninstall package in Windows

Source: Internet
Author: User
Use the noninstall package to install MySQL in Windows and use the noninstall package to install MySQL in Windows
Step 1 decompress the zip package and copy the directory mysql-5.6.19-winx64 to the installation directory (assuming ROOT_DIR.
2. create a configuration file. Locate the system directory (execute echo % WINDIR % under cmd), copy the file ROOT_DIR/mysql-5.6.19-winx64/my-default.ini to the system directory, and rename it my. ini. Edit my. ini and modify the configuration. The server configuration is in the [mysqld] section. The following parameters need to be set: basedir mysql installation path, should be ROOT_DIR/mysql-5.6.19-winx64. The directory where datadir saves data files. the default value is data. If the relative path is used, it is relative to basedir. If you have selected another directory to store the data file, you need to copy the file under the Directory ROOT_DIR/mysql-5.6.19-winx64/data. Otherwise, Table mysql. user doesn' t exists will be reported when mysqld is started for the first time. Port listening port. MySQL is 3306 by default. 3. start the instance for the first time. Open cmd, enter the directory ROOT_DIR/mysql-5.6.19-winx64/bin, execute the command start there are two cmd windows. Execute mysqld -- console in one to check that the output Version: '5. 100' socket: ''port: 6.19 MySQL Community Server (GPL) indicates that the Server is successfully started. In this case, execute the command mysql in another cmd window. if you can connect to the database, it indicates that the initial startup is successful. Enter exit to exit the mysql client, and then execute mysqladmin-u root shutdown to close the mysql server. 4. set environment variables. Modify the environment variable to add the directory ROOT_DIR/mysql-5.6.19-winx64/bin to the PATH. 5. start the service as a windows service. Open cmd and run mysqld -- install. if the output result is successfully installed, the Service is successfully installed. In this case, you can see the MySQL service in the management tools> service. Run the net start mysql command to start the mysql service. 6. Modify the root password for mysql test 7.
Problem [ERROR] Fatal error: Can't open and lock privilege tables: Table 'MySQL. user 'doesn' t exist cause: the datadir parameter is set, but the file under the ROOT_DIR/mysql-5.6.19-winx64/data directory is not copied.
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061) cause: Mysql service is not started.


From Weizhi note (Wiz)

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.