What is the function in MySQL used for password encryption and why should it not be used in applications?
The function in MySQL used for password encryption is `PASSWORD()`. However, it is not recommended to use this function for password encryption in applications because it uses a weak hashing algorithm that can be easily cracked. Instead, it is recommended to use stronger encryption methods such as bcrypt or Argon2.
$password = 'password123';
$hashed_password = password_hash($password, PASSWORD_BCRYPT);