MYSQL Error 1045 access denied cause and Solution
Operating System: windows-xp
Database tutorial version: mysql tutorial 5.x
Tip:Access denied for user 'root' @ 'localhost' using password yes/no
It turned out to be good. The above error was prompted when I started the system today. It is still not possible to restart mysql.
Note that the environment here is windows-xp. The operations in linux have not been verified and the situation is unclear.
1. log on to the system as an administrator to stop the mysql service or stop the mysql process.
2. Start the command line window of windows (usually dos window: Run cmd) and switch to your "mysqlbin" directory.
For example, I am "d: program filesmysqlmysql server 5.2bin", and then execute the following bold command: (pay attention to your "my. ini" location)
Microsoft windows xp [version 5.1.2600]
(C) Copyright 1985-2001 microsoft corp.
C: documents and settingsadministrator> cd d: program filesmysqlmysql server 5.2bin
C: documents and settingsadministrator> d:
D: program filesmysqlmysql server 5.2bin> mysqld -- defaults-file = "d: program filesmysqlmysql server 5.2my.ini" -- console -- skip-grant-tables
100608 9:04:12 innodb: started; log sequence number 0 46409
100608 9:04:12 [note] mysqld: ready for connections.
Version: '5. 2.0-falcon-alpha-community 'socket: ''port: 3306 mysql community
Server (gpl)
100608 9:06:57 [warning] found invalid password for user: 'root @ localhost'; ign
Oring user
1 2