Solution to mysql ERROR 1045 (28000) problem

Solution to mysql ERROR 1045 (28000) problem

I encountered mysql ERROR 1045 and spent a long time on this problem. I wrote it down myself. The method is from Baidu and has been proven to be effective.

ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)

ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: YES)-----This is the problem

Under Windows, the solutions to the above two errors

1. Find the configuration file my.ini and open it. You can choose to open it with Notepad.

2. After opening, search for the mysqld keyword and add skip-grant-tables under mysqld, save and exit.

PS: If you are prompted not to save, you can cut the file to the desktop, save the changes, and then copy it to the mySQL directory

3. Start button + R, open the Run dialog box, enter "services.msc" to open the service window

4. Restart MySQL service

5. Then run cmd and enter mysql -u root -p to log in without a password. When password: appears, press Enter to enter.

6. Enter the mysql database:

mysql> use mysql;Database changed

7. Set a new password for the root user:mysql> update user set password=password("123456") where user="root";

Tip: Query OK, 1 rows affected (0.04 sec) Rows matched: 1 Changed: 1 Warnings: 0

8. Refresh the database mysql> flush privileges;

Tip: Query OK, 0 rows affected (0.01 sec)

9. Exit mysql:mysql> exit

Tip: Bye

PS: 123456 is the new password. Users can change it to their own password according to their needs.

10. After the change, modify the my.ini file again, delete the "skip-grant-tables" line we just added, save and exit, and restart the MySQL service.

Wonderful topic sharing:

MySQL different versions installation tutorial

MySQL 5.7 installation tutorials for various versions

MySQL 5.6 installation tutorials for various versions

mysql8.0 installation tutorials for various versions

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • How to solve the mysql ERROR 1045 (28000)-- Access denied for user problem
  • ERROR 1045 (28000): Access denied for user ''''root''''@''''localhost''' (using password: YES) Practical solution
  • How to solve the error "ERROR 1045 (28000)" when logging in to MySQL
  • Solve the problem of ERROR 1045 (28000): Access denied for user ''root''@''localhost'' when logging in after installing MySQL 5.7.17 on Ubuntu 16.04
  • MySQL ERROR 1045 (28000): Access denied for user ''root''@''localhost'' (using password: NO) Causes and solutions
  • MySQL login error prompt: Solution to ERROR 1045 (28000)
  • MYSQL ERROR 1045 (28000): Access denied for user (using password: YES) solution
  • Solve mysql: ERROR 1045 (28000): Access denied for user ''root''@''localhost'' (using password: NO/YES)

<<:  Detailed explanation of Linux less command examples

>>:  Solve the problem that element edit form el-radio cannot be selected after echoing

Recommend

Vue scaffolding learning project creation method

1. What is scaffolding? 1. Vue CLI Vue CLI is a c...

A brief analysis of CSS :is() and :where() coming to browsers soon

Preview versions of Safari (Technology Preview 10...

React method of displaying data in pages

Table of contents Parent component listBox List c...

Use and optimization of MySQL COUNT function

Table of contents What does the COUNT function do...

7 ways to vertically center elements with CSS

【1】Know the width and height of the centered elem...

How to view and terminate running background programs in Linux

Linux task management - background running and te...

Installation process of zabbix-agent on Kylin V10

1. Download the installation package Download add...

Detailed graphic explanation of how to use svg in vue3+vite project

Today, in the practice of vue3+vite project, when...

Summary of CSS gradient effects (linear-gradient and radial-gradient)

Linear-gradient background-image: linear-gradient...

CSS specification BEM CSS and OOCSS sample code detailed explanation

Preface During project development, due to differ...

jQuery implements font size adjustment case

This article shares the specific code of jQuery t...