Documentation Home
MySQL Internals Manual


MySQL Internals Manual  /  ...  /  Client Wants Native, Server Wants Old

14.12.3.1 Client Wants Native, Server Wants Old

$ mysql --default-auth=mysql_native_password   ## against a mysql_old_password user

Initial Handshake Packet:

50 00 00 00 0a 35 2e 36    2e 34 2d 6d 37 2d 6c 6f    P....5.6.4-m7-lo
67 00 5d 0a 00 00 66 5c    7b 74 55 2d 7b 4b 00 ff    g.]...f\{tU-{K..
ff 08 02 00 0f c0 15 00    00 00 00 00 00 00 00 00    ................
00 40 42 68 66 48 74 2f    2d 34 5e 5a 2c 00 6d 79    .@BhfHt/-4^Z,.my
73 71 6c 5f 6e 61 74 69    76 65 5f 70 61 73 73 77    sql_native_passw
6f 72 64 00                                           ord.

Handshake Response Packet announces client wants user old with mysql_native_password:

4f 00 00 01 85 a6 0f 00    00 00 00 01 08 00 00 00    O...............
00 00 00 00 00 00 00 00    00 00 00 00 00 00 00 00    ................
00 00 00 00 6f 6c 64 00    14 1c eb bb 3a 53 97 c6    ....old.....:S..
0d 80 b0 62 75 ea 71 24    a2 6c cd 53 81 6d 79 73    ...bu.q$.l.S.mys
71 6c 5f 6e 61 74 69 76    65 5f 70 61 73 73 77 6f    ql_native_passwo
72 64 00                                              rd.

server checks the account settings and sees mysql_old_password and asks the client to switch:

29 00 00 02 fe 6d 79 73    71 6c 5f 6f 6c 64 5f 70    )....mysql_old_p
61 73 73 77 6f 72 64 00    66 5c 7b 74 55 2d 7b 4b    assword.f\{tU-{K
40 42 68 66 48 74 2f 2d    34 5e 5a 2c 00             @BhfHt/-4^Z,.

client reprocesses the password and sends it according to the mysql_old_password:

09 00 00 03 4e 55 4c 52    40 5e 46 54 00             ....NULR@^FT.

server is happy and sends a OK_Packet:

07 00 00 04 00 00 00 02    00 00 00                   ...........

User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
Sign Up Login You must be logged in to post a comment.