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

How to install and configure mysql 8.0.11

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

Share

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

How do I install and configure mysql 8.0.11? In view of this problem, this article introduces the corresponding analysis and answers in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.

MySQL configuration

Then create a new one in the extracted folder

My.ini file

[mysqld] # set port 3306 port=3306# set the installation directory of mysql:\\ JavaEnvironment\ mysql-8.0.11-winx64# set the directory where the data of mysql database is stored datadir=C:\\ JavaEnvironment\ mysql-8.0.11-winx64\\ data# allow the maximum number of connections max_connections=200# allows the number of connections to fail. This is to prevent anyone from attempting to attack the character set used by the max_connect_errors=10000# server of the database system from this host, which defaults to the default storage engine default-storage-engine=INNODBwait_timeout=31536000interactive_timeout=31536000#sql_mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER that UTF8character-set-server=utf8# will use when creating new tables. NO_ENGINE_ support [MySQL] # set the default character set of the mysql client default-character-set=utf8 [client] # set the port port=3306default-character-set=utf8 used by default when the mysql client connects to the server

Paste the above code into it

Need to pay attention to here

# set the mysql installation directory basedir=C:\\ JavaEnvironment\ mysql-8.0.11-winx64# set the mysql database data storage directory datadir=C:\\ JavaEnvironment\ mysql-8.0.11-winx64\\ data

These two lines should be changed according to your mysql location.

Configuration of environment variables

Then configure the environment variables

Then configure it in Path

MySQL service initialization

Next, start the installation.

Run under CMD

Mysqld-initialize-user=mysql-console

You can see

Be sure to remember this initial password. You need to log in to mysql with this initial password to change the password later.

If you click emm without him, you just delete the data file configured by datadir, and then perform initialization again.

Then enter

Mysqld-install

Register the service.

Open the service again (here you need to run cmd with administrator privileges)

Net start mysql

And then I started to play happily.

Change the default password

Use

Mysql-u root-p

Log in to mysql and output the original password

Next, let's change the password.

ALTER USER "root" @ "localhost" IDENTIFIED BY "123456"

At this point the password is initialized to 123456.

Other

If there is an error when connecting using the database connection tool, you can try adding mysqld after the mysqld in the my.ini configuration file.

This is the answer to default_authentication_plugin=mysql_native_password 's question on how to install and configure mysql 8.0.11. I hope the above content can be of some help to you. If you still have a lot of doubts to solve, you can follow the industry information channel for more related knowledge.

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