Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation and configuration method of zip for mysql compressed package

2025-03-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Compressed version of similar articles have some problems, the lack of initialization of data, so combined with several articles to improve it, I hope it will be helpful to the installer on Windows.

MYSQL can be installed in two ways: msi installation and zipdecompression. The zip package is unzipped to a directory and needs to be configured to use it. The installation method of Mysql compressed package version is described in detail below.

Download the mysql package file

Download address: mysql archive file

① selects the appropriate mysql version, as shown in the figure

② selects the appropriate version according to the computer system, click Download to go to the jump page and download without login (that is, there is no need to register on the website): as shown in figure 1 and figure 2

Click "No thanks, just start my download." Start downloading

Second, decompress and install the compressed package.

It can be installed on any system disk, and I am used to installing it under disk D, so I created a new mysql folder under disk d to store the extracted files of mysql (don't tell me that I don't know how to extract files). Directory structure: d:\ mysql\ mysql-5.6.33-winx64. At this point, many beginners will directly run the mysql.exe file in the directory D:\ mysql\ mysql-5.6.33-winx64\ bin, and then pop up a box that flashes and disappears, because the mysql service has not been installed yet, so far, just download the package and extract it to the appropriate directory.

Here is how to install the mysql service:

1. Configure the my.ini file.

In D:\ mysql\ mysql-5.6.33-winx64\ (note that this directory is the same as your own directory, what I download here is version 5.6, if you download version 5.5, this directory is different), create a new configuration file called my.ini, and then copy the following configuration code to my.ini (change the path in the code to your own file storage path). As shown in the figure:

Code:

[mysql] # set mysql client default character set default-character-set=utf8 [mysqld] # set port 3306 port = 3306 # set mysql installation directory basedir=D:\ mysql\ mysql-5.6.33-winx64# set mysql database data storage directory datadir=D:\ mysql\ mysql-5.6.33-winx64\ data# maximum number of connections the character set used by the max_connections=200# server defaults to 8-bit encoding The default storage engine default-storage-engine=INNODB that the latin1 character set character-set-server=utf8# will use when creating new tables

2. Install the mysql service:

Change the directory to the D:\ mysql\ mysql-5.6.33-winx64\ bin directory where you extracted the files.

Initialize and start the Mysql service:

a. Run cmd with administrator privileges

b. Enter the bin of mysql

c. Initialize, generate data folder

> mysqld-- initialize-insecure (recommended. Do not set root password)

> mysqld-- initialize (not recommended, generate a random root password)

d. Install the MySql service

> mysqld-install

The successful installation is shown in the figure:

3. Start mysql service.

Start mysql

> net start mysql

After the installation is successful, someone directly enters mysql-uroot-p and then enter enter.

After logging in to mysql, set the root password

> set password for root@localhost = password ('YourPassword')

Or use mysqlamdin to change the root password

> mysqladmin-u root-p password NewPassword

The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report