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

Mysql version 8.0.15 installation tutorial Connect Navicat.list

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

Share

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

Stepped on the pit

1. Many tutorials on the Internet write the file name of the configuration environment variable named my.ini, and then can not start it alive or dead, even after starting the login password, there are all kinds of errors, and finally it is changed to my-default.ini, and the login is barrier-free.

two。 You need to change the initial password before using mysql. The instructions in version 8.0.15 are different from others. Because the password is encrypted, you need to use mysql_native_password to downgrade the password, otherwise there will be a 1064 error in connecting to Navicat.

Specific installation

1. Download from the official website

This is that after the compressed package is decompressed, there is no need to install it, just enter the terminal instructions directly.

two。 Configure the environment variable (you can choose not to configure it in this step. Configuring the environment variable is equivalent to setting a shortcut. When operating with the Windows terminal, you do not have to cd to your path)

My computer > right button > Properties > Advanced system Settings > Advanced > Environment variables >

To edit directly, you only need to add a semicolon after the existing content and enter your own decompressed mysql path: mine is c:\ mysql\ bin, be sure to bin the file directory.

3. Add the my-default.ini file, create a new notepad to change the file and suffix, as follows

[mysql] # set mysql client default character set default-character-set=utf8 [mysqld] # set 3306 port port = 3306 # set mysql installation directory basedir=C:\ mysql# set mysql database data storage directory datadir=C:\ mysql\ data # allow maximum number of connections max_connections=200 # the character set used by the server defaults to UTF8character-set-server=utf8 # the default storage engine default- to be used when creating new tables Storage-engine=INNODB # uses the "mysql_native_password" plug-in to authenticate default_authentication_plugin=mysql_native_password [client] # by default to set the default port and default character set port=3306default-character-set=utf8 for mysql clients to connect to the server

This is a pit, a lot of write my.ini, resulting in the following pile of error, pay attention to modify the path of basedire and datadir

4. Terminal startup and login

The first step is cd c:\ mysql\ bin (change the file path and write your own)

Step 2 mysqld install

C:\ mysql\ bin > mysqld installThe service already clients the current server installed: "C:\ Program Files\ MySQL\ bin\ mysqld" MySQL

The error is that you may have installed mysql before and did not uninstall it completely. Use the following command or use mysqld remove directly.

C:\ mysql\ bin > cd c:\

C:\ > sc query mysqlSERVICE_NAME: mysql TYPE: 10 WIN32_OWN_PROCESS STATE: 1 STOPPED WIN32_EXIT_CODE: 1067 (0x42b) SERVICE_EXIT_CODE: 0 (0x0) CHECKPOINT: 0x0 WAIT_HINT: 0x0c:\ > sc delete mysql [SC] DeleteService succeeded c:\ > cd c:\ mysql\ binc:\ mysql\ bin > mysqld installService successfully installed.

Service successfully installed. Indicates that mysqld is installed successfully

Step 3: open the mysql service

Stepped on the pit: the service cannot be started, all because the configuration file name is incorrect.

Step 4: log in to mysql

Enter directly after the appearance of password

Stepped on the pit: 10061 error

It is all caused by the wrong configuration file name.

The fifth step is to change the password. You must change the password before using mysql. If you have nativepassword to connect with Navicat, BY 'enter your own password'. Don't forget the semicolon.

Connect Navicat

Connect mysql

Enter the connection name casually. The password is the password of the root permission of mysql that you modified before.

The reason for error 1251 is a password problem, because the mysql password of 8.0.15 is encrypted with previous password change statements (for example: alter user 'root'@'localhost' identified by' password' 😉).

The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.

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