mysql8.0 compressed version installed under Windows

Source: Internet
Author: User
Tags mysql client

The following summarizes the installation process:

  1. First unzip the downloaded compressed version.
  2. Configure the system environment in the path variable after the extracted MySQL bin file directory
  3. Open the Command window with CMD, enter the mysqld --initialize command to initialize the MySQL data directory, and remember that after the initialization, a data folder is generated in the extracted directory , this folder has a. Err end file, which will have a randomly generated password when opened. Of course, you can also use the mysqld --initialize--console command, which generates random passwords that appear in a DOS window.
  4. Enter mysqld--install to install the MySQL service.
  5. Start the service with net start MySQL.
  6. Login and Change password mysql-u root-p password is the random password generated just now
  7. alter USER ' root ' @ ' localhost ' identified WITH MySQL _native_password by ' newpassword ";

< Span class= "hljs-string" >        This seems to be all done, but in fact, forget one important thing, you will find that there is no My.ini file in the database installation directory,

< Span class= "hljs-string" >        that the database started without the initialization parameters, this work requires us to manually create a My.ini file, the basic content is as follows:

[MySQL]; setting MySQL client default character set default-character-set =3306  ; Set the installation directory for MySQL Basedir=e:\basedb\mysql set the data storage directory of MySQL database datadir=e:\basedb\mysql\data; Allow maximum number of connections max_connections=$; The character set used by the service side defaults to the 8-bit encoded latin1 character set character-set-server=UTF8; The default storage engine that will be used when creating a new table  -storage-engine=innodb

Of course after you create this file, it is still not in effect, this is where you can first use net stop MySQL to stop MySQL and then restart.

Of course, we can also put the creation of the My.ini file in the third step above, so that the generated data directory will be located in the file configuration of the DataDir location,

mysql8.0 compressed version installed 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.