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

Example Analysis of MySQL 8.0.18 Command

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

Share

Shulou(Shulou.com)05/31 Report--

Xiaobian to share with you MySQL 8.0.18 command sample analysis, I believe most people still do not know how, so share this article for everyone's reference, I hope you have a lot of harvest after reading this article, let's go to understand it together!

Open the folder C:\web\mysql-8.0.11 that you just extracted, create a my.ini configuration file under this folder, and edit my.ini to configure the following basic information:

[client]#Set mysql client default character set default-character-set=utf8[mysqld]#Set port 3306 port = 3306#Set mysql installation directory basedir=C:\\web\\mysql-8.0.11#Set mysql database data storage directory, MySQL 8+ does not need the following configuration, the system can generate its own, otherwise it may error # datadir=C:\\web\\sqldata#Max_connections=20#The character set used by the server defaults to 8-bit encoded latin1 character set character-set-server=utf8#Default storage engine used when creating new tables default-storage-engine=INNODB

Open the cmd command line tool as an administrator (failure to open as an administrator will cause the database installation to fail later), switch directories:

cd C:\web\mysql-8.0.11\bin

Initialize database:

mysqld --initialize --console//Remember APWCY5ws&hjQ after root@localhost. APWCY5ws&hjQ is the initial password, which is needed for subsequent login. You can also modify the password after login.

Enter the following installation command:

mysqld install

Start by entering the following command:

net start mysql

Log in to MySQL:

mysql -u root -p

Then enter your login password.

Change password:

ALTER USER 'root'@'localhost' identified by '123';

Creating a database:

create database The name of the database created;

Switch database:

use database name;

Delete database:

drop database name;

Exit MySQL:

quit

The above is "MySQL 8.0.18 command sample analysis" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

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

Wechat

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

12
Report