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

Start the installation-free version of mysql with configuration under Windows

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

First, download the Zip version of the installation-free version of Mysql, and extract it under the installation directory

Second, add the Bin directory of Mysql to the Path of Windows so that commands such as mysql can be accessed.

* when you encounter a strange problem, the mysql running record is added to the path of win10. But the execution of mysql is still not found. The bin directory of mysql is now the last entry in path. Later, add another item to path (for example, path is.;% MYSQL_BIN%;D:\ test;), you can find mysql in the command.

Third, create the startup options file my.ini for Mysql.

Mysql searches for My.ini configuration files from multiple directories such as C:, Windir, installation directory, and so on. Mysql5.7.1.17 does not have a configuration file for startup, and no Data folder is set. You can create a data directory in the installation directory or where you want to store the data

Create a My.ini file and configure the settings as follows

[client]

# client uses UTF8

Default-character-set=utf8

[mysqld]

# Directory where the service is started

# Note under Windows, the directory path separator should be /, and if you want to use backslash, you should use\\.

Basedir=D:/Server/mysql-5.7.18-winx64

Datadir=D:/Server/mysql-5.7.18-winx64/data

Port = 3306

# the server uses UTF8 by default

Character-set-server=utf8

# you can log in to MYSQL without using the authorization form, which is applicable for the first time.

Skip-grant-tables

Fourth, call the initialization command to initialize. This command needs to be run with administrator privileges.

Win10 right-click the window icon in the start menu-> command prompt (administrator) to open it.

Mysqld-initialize

\ mysqld-- initialize-insecure # this command means that after initialization, the root user has an empty password

* * at the same time, you can make configuration files to be used during initialization.

Mysqld-- defaults-file=C:\ my.ini-- initialize

After executing this command, MYSQL will initialize the data data storage directory and some initialization of the original table of the database, including the creation of root users.

In the XXXXXX.err file under the data (data directory) directory, you can view the random password of the generated root

Fifth, start the mysql service

Mysqld-console

Fifth, log in and change the password

If you forget your password, you can find the initialized random password in MySql's error log.

ALTER USER 'root'@'localhost' IDENTIFIED BY' Abcd8888'

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