please let me know the best way to insert passwords into a mysql database... 1. varchar (20) using PASSWORD('$password') 2. varchar (20) using MD5('$password') 3. other? This one is important! If I were to encrypt/hash the passwords in the mysql DB and then would have to upgrade servers moving the DB to another server, would the new mysql be able to decrypt the passwords? thanks!
varchar 20 is not enough. you have to use varchar 32. md5 generates 32 character. example: 1aabac6d068eef6a7bad3fdf50a05cc8