Search code examples
mysqlprivilegessql-grant

`Identified By Password` in Create Database MySQL


I reviewed the logs records for create database-user and it caught my attention: '*94060046C2F3321FA041154DF7FE002629402435'

GRANT USAGE ON *.* TO 'username_name'@'localhost' IDENTIFIED BY PASSWORD '*94060046C2F3321FA041154DF7FE002629402435';

What is this password?


Solution

  • MySQL hashes passwords stored in the mysql.user table to obfuscate them. For most statements described here, MySQL automatically hashes the password specified.

    So '*94060046C2F3321FA041154DF7FE002629402435'; is the obfuscated value of the password

    http://dev.mysql.com/doc/refman/5.6/en/assigning-passwords.html