MySQL: How does AES_ENCRYPT turn the password into a key?
This really isn't a mysql question, more of a "how does encryption work" question.  If you have some time to kill you might want to watch this series

http://www.youtube.com/watch?v=dlS5_qfxAss&amp;feature=results_main&amp;playnext=1&amp;list=PLDCC9179604F435AB

Here's what I felt was a good explaination of password strength I came across a while back

http://www.reddit.com/r/programming/comments/9pu3k/how_long_would_it_take_to_bruteforce_crack_an_aes/c0dv7sx

Remember though, the theoretical security of your password is moot if it's stored in source code that is not secure (world readable, ending up in a .mysql_history when working from the commandline, etc).