When MySQL logs on, error 1045 (28000): Incorrect resolution

Source: Internet
Author: User
Tags change settings dedicated server

Description of the error problem:


ERROR 1045 (28000): Access denied for user ' ODBC ' @ ' localhost ' (using Password:no)

ERROR 1045 (28000): Access denied for user ' ODBC ' @ ' localhost ' (using Password:yes)

Workaround for the above two errors under Windows


1, find the configuration file My.ini, and then open it, you can choose to open with notepadd++

2. After opening, search mysqld keyword

When found, add skip-grant-tablesbelow mysqld to save the exit.

PS: If prompted not to save, you can cut the file to the desktop, change the save and then copy to the MySQL directory

# for advice The change settings
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
# * * * Don't EDIT this FILE. It ' s a template which'll be copied to the
# * * * default location during install, and would be replaced if you
# * * * * Upgrade to a newer version of MySQL.


# Remove Leading # and set to the amount of RAM for the most important data
# Cache in MySQL. Start at 70% of all RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M

# Remove Leading # to turn on a very important data integrity option:logging
# Changes to the binary log between backups.
# Log_bin

# These is commonly set, remove the # and set as required.
Basedir = D:\SoftWare\MySQL\mysql-5.7.11-winx64
DataDir = D:\SoftWare\MySQL\mysql-5.7.11-winx64\Data
Port = 3306
# server_id = ...

# Remove Leading # To set options mainly useful for reporting servers.
# The server defaults is faster for transactions and fast selects.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M


This is used to skip the password problem, but it's not going to be solved completely!

3. Restart MySQL Service

In any path directory, you can shut down/restart the MySQL service. (because, before, the global environment variable has been configured)

net stop MySQL

net start MySQL

4. Enter the database and reset the password.

Mysql-u root-p Enter

No tube password Enter

mysql> use MySQL; Enter

mysql> Update Mysql.user Set Authtntication_string=password (' rootroot ') where user=' root '; (Password set yourself)

mysql> flush Privileges; Refreshing the database

Mysql> quit;

5, password reset success, modified, and then modify the My.ini this file, we just joined the "Skip-grant-tables" this line to delete, save and restart the MySQL service will be OK.

6, restart the MySQL service, and login to the MySQL user, the user is root, password is rootroot.

d:\software\mysql\mysql-5.7.11-winx64\bin> net stop MySQL

d:\software\mysql\mysql-5.7.11-winx64\bin> net start MySQL

D:\software\mysql\mysql-5.7.11-winx64\bin>mysql-u root-p

Enter Password:rootroot

Thanks to the following bloggers:


When MySQL logs on, error 1045 (28000): Incorrect resolution

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.