MYSQL password() Function

MYSQL password() Function

With mysql, you can create a password by typing:

select password('password');

The password in this case is the string '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19'

To update a password,
1) Open SQL with phpMyAdmin.
2) UPDATE tablename set password=password(`pass123`) WHERE username ='myname'

However, you can always use the password() function in a query with PHP.

For example,
$string= 'password123';
$command = "INSERT into tablename VALUES (NULL, '".addslashes($_POST[email])."', password($string));