• notice
  • Congratulations on the launch of the Sought Tech site

WINDOWS MYSQL5.7.18 Installation Tutorial

This article explains how to install MySQL from the compressed package.

1.Download the MySQL compressed package, [Windows (x86, 64-bit), ZIP Archive];

2.Unzip the Zip package to the required directory, for example D:\mysql-5.7.18-winx64 ;

3.Create a my.ini file with the following content:

[mysqld]
port=3306
basedir=D:\\mysql-5.7.18-winx64\\
datadir=F:\\mysqlData\\
character-set-server=utf8

Note that basedir and datadir must be configured, and basedir is the directory you unzip.According to the official documentation, if you like to use slashes, you should use double slashes, but not for backslashes.Namely: D:\\mysql-5.7.13-winx64\\ or: D:/mysql-5.7.13-winx64/
Since I like to separate the data files of the database, I configure the datadir to other places for easy management.

4.Configure environment variables

Add a variable named MYSQL_HOME.
Modify the Path variable and add %MYSQL_HOME%\bin

at the end

5.Initialize and start the Mysql service

Run cmd with administrator privileges, initialize MySQL, execute

mysqld --initialize-insecure

Register MySQL service, start MySQL, execute

mysqld -install
net start mysql

6.Log in to MySQL and set the root password

mysql -uroot -p

When logging in for the first time, press Enter to log in without a password.After logging in to mysql, set the root password.

ALTER USER'root'@'localhost' IDENTIFIED BY'MyNewPass4!';

After changing the password, we can log in successfully with root.

Tags

Technical otaku

Sought technology together

Related Topic

1 Comments

author

buy lipitor pills & lt;a href="https://lipiws.top/"& gt;lipitor without preion& lt;/a& gt; lipitor 10mg pills

Imejva

2024-03-08

Leave a Reply

+