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 method of mysql using dos command

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

This article mainly introduces the installation method of mysql using dos command, which has certain reference value and can be used for reference by friends who need it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.

Methods: 1, download the MySQL package on the mysql official website and decompress it; 2, configure the environment variables; 3, create a new my.ini file under the mysql path and configure it; 4, the administrator runs the cmd command line, enter the "mysqld install" command, and enter the service.

The MySQL package is installed using the dos command

Step one:

Configure the environment variable to enter the bin directory copy path in the mysql archive file and paste it in the system variable path

Step 2:

Record in the new my.ini under the mysql path

[mysql] # set mysql client default character set default-character-set=utf8 [mysqld] # set port 3306 port = 330mm set mysql installation directory basedir=F:\ mysql8.0.14 (fill in your mysql installation directory) # set mysql database data storage directory datadir=F:\ mysql8.0.14\ data (fill in your mysql installation directory Data does not have to create what it will create) # allow maximum number of connections the character set used by the max_connections=200# server defaults to the 8-bit encoded latin1 character set character-set-server=utf8# the default storage engine default-storage-engine=INNODB that will be used when creating new tables

Step 3:

The administrator runs cmd, enter mysqld install and the service has been installed on ok

Then type mysqld-- Initialize, and then there will be a file with the suffix .err in the data folder. The initial password must be remembered. I have been trapped by sand sculptures on the Internet many times.

If you wait for the completion, you will not report an error, that is, if you have completed the dos box, there is no prompt.

Step 4:

Add a space between the mysql-uroot-p bars. Otherwise, enter the initial password and enter the mysql.

Step 5:

Modify encryption if you want to use nativemysql management tools, you have to do this step.

Use mysql

Select user,plugin from user

You can see how root is encrypted.

Then modify the statement

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY' root'

Then change the password.

SET PASSWORD FOR 'root'@'localhost' = PASSWORD (' password you want to set')

Statement can directly copy the semicolon, too, or the MySQL will not end.

It is also easy to reinstall if anything goes wrong in the above process.

Registry regedit Open

Computer\ HKEY_LOCAL_MACHINE\ SYSTEM\ ControlSet001\ Services\ EventLog\ Application\ MySQLD Service

Computer\ HKEY_LOCAL_MACHINE\ SYSTEM\ ControlSet001\ Services\ EventLog\ Application\ MySQLD Service

Follow this path and delete the belt mysql.

The dos command executes the sc delete mysql deletion service.

If you can't execute MySQL when you start running dos, then execute cmd in the bin directory and then do the following

Thank you for reading this article carefully. I hope it is helpful for everyone to share the installation method of mysql using dos command. At the same time, I also hope you can support us, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are waiting for you to learn!

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