Use AES_ENCRYPT ()
,AES_DECRYPT()
functions in mysql for encryption and decryption.
example:
insert into landb.login (id, username, password )values(123, '12',AES_ENCRYPT ('nidhinek','nixpass'))
select AES_DECRYPT(landb.login.password, 'nixpass') from login where id=123
Output:nidhinek