Documentation Home
MySQL Internals Manual
Download this Manual
EPUB - 1.2Mb


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

14.12.3.2 Client Wants Old, Server Wants Native

$ mysql --default-auth=mysql_old_password   ## against a mysql_native_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 5b 0a 00 00 6c 2e    3e 2f 6c 55 44 36 00 ff    g.[...l.>/lUD6..
ff 08 02 00 0f c0 15 00    00 00 00 00 00 00 00 00    ................
00 22 43 6b 74 24 52 53    29 71 7d 44 77 00 6d 79    ."Ckt$RS)q}Dw.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 root with mysql_old_password:

39 00 00 01 85 a6 0f 00    00 00 00 01 08 00 00 00    9...............
00 00 00 00 00 00 00 00    00 00 00 00 00 00 00 00    ................
00 00 00 00 72 6f 6f 74    00 00 6d 79 73 71 6c 5f    ....root..mysql_
6f 6c 64 5f 70 61 73 73    77 6f 72 64 00             old_password.

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

2c 00 00 02 fe 6d 79 73    71 6c 5f 6e 61 74 69 76    ,....mysql_nativ
65 5f 70 61 73 73 77 6f    72 64 00 6c 2e 3e 2f 6c    e_password.l.>/l
55 44 36 22 43 6b 74 24    52 53 29 71 7d 44 77 00    UD6"Ckt$RS)q}Dw.

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

14 00 00 03 f4 17 96 1f    79 f3 ac 10 0b da a6 b3    ........y.......
b5 c2 0e ab 59 85 ff b8                               ....Y...

server is happy and sends a OK_Packet:

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

User Comments
Sign Up Login You must be logged in to post a comment.