Bug #48674 Receiving error 1045 (28000): Access denied for user 'username'@'clientname'
| Submitted: | 10 Nov 2009 19:17 | Modified: | 10 Nov 2009 20:31 |
|---|---|---|---|
| Reporter: | Craig Matthews | Email Updates: | |
| Status: | Can't repeat | Impact on me: | |
| Category: | MySQL Server: Command-line Clients | Severity: | S2 (Serious) |
| Version: | 5.1.40 | OS: | Windows (Windows 7 x86 and Windows Server 2008 R2 x64) |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | 1045, access denied | ||
[10 Nov 2009 19:17]
Craig Matthews
[10 Nov 2009 20:10]
Peter Laursen
this is not mix-cased problem! Just try: C:\Program Files\MySQL\MySQL Server 5.1\bin>mysql -uroot -pmypass or C:\Program Files\MySQL\MySQL Server 5.1\bin>mysql -uroot -pmypass somedatabase
[10 Nov 2009 20:10]
MySQL Verification Team
Thank you for the bug report. I couldn't repeat: c:\dbs>5.1\bin\mysql -uroot --port=3510 -hlocalhost Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.1.42-Win X64-log Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> grant all on *.* to "username"@"localhost" identified by "AbC"; Query OK, 0 rows affected (0.38 sec) mysql> exit Bye c:\dbs>5.1\bin\mysql -uusername --port=3510 -hlocalhost -pAbC Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.1.42-Win X64-log Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> exit Bye c:\dbs>5.1\bin\mysql -uusername --port=3510 -hlocalhost --password=AbC Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.1.42-Win X64-log Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
[10 Nov 2009 20:31]
Craig Matthews
The problem I had was connecting from Windows 7 (x86) to MySQL Server running on Windows Server 2008 R2 (x64). I suspect that the problem is on the Windows Server 2008 R2 (x64) end. I just tried a command line containing the mixed case password as if it were a database name, and the uppercase characters were displayed as lowercase. However, using the -pmypass (with no space between the -p and the password) works, but the -password=mypass does not. Strange inconsistency.
[10 Nov 2009 21:00]
Peter Laursen
@Craig .. is it this small thing only? this is wrong (single hyphen): mysql -h ServerName -u username -password=AbC correct is (double hyphen) mysql -h ServerName -u username --password=AbC .. I believe in the first example it gets interpreted like (p)+(assword=AbC) .. ie. it tries to authenticate with password "assword=AbC" (common unix-type command syntax used by MySQL programs is single hyphen (-) for short parameter form and double hyphen (--) for long parameter form).
[5 Nov 2011 0:42]
Rick James
On the commandline, do not have a space between -p and the password.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.107 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.