Setting up email server for wordpress 1 click install

Posted September 8, 2020 1.1k views

Hello i’m trying to setup my email on my server per the tutorial posted on digital ocean( When I get to the step:

INSERT INTO servermail.virtual_users
(id, domain_id, password , email)
(‘1’, '1’, ENCRYPT('firstpassword’, CONCAT(’$6$’, SUBSTRING(SHA(RAND()), -16))), ’’),
('2’, '1’, ENCRYPT('secondpassword’, CONCAT(’$6$’, SUBSTRING(SHA(RAND()), -16))), ’’);

I get an error:
ERROR 1305 (42000): FUNCTION servermail.ENCRYPT does not exist

How can this be fixed so I can have access to email. Thanks.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Hi @brianallen714,

Can you confirm where exactly are you getting this error, the above mentioned

INSERT INTO `servermail`.`virtual_domains`
(`id` ,`name`)
('1', ''),
('2', '');

Needs to be added in your MySQL DB which you have configured previously.

Are you executing the query there?



Think that the ENCRYPT function was depricated in the latest versions.

You should be able to use the SHA2()

Hope this might help you.

Ivan / YoghurtPower