Database connection error after migrate from production domain to main domain

Hi all,

I have this creazy error:
An exception has been thrown during the rendering of a template (“SQLSTATE[HY000] [1045] Access denied for user ‘serverusername_utilizatornou’@‘localhost’ (using password: NO) (SQL: select * from rainlab_translate_message_data where locale in (en, en))”).

The problem occurs nouw for the second site that we are migrating from the Dev server where it works great to the Main one. We migrate the website by trasnfering all the public_html files, setup database, username and password, change the data in the .env file and until now this technique worked great…now, it gets us crazy :frowning: . Maybe is related to the latest October CMS version?

Have anyone got this error?
Thank you in advance.

UPDATE. The crazy problem is DATABASE USERNAME PASSWORD FORMAT! Yes, it seems crazy, but if the first character of the Database Username Password is —> # <— than the error is thrown. Team, you should check this aspect because it can get crazy sometimes :slight_smile:

Thanks.

You should put the password in single or double quotes, as # is for comments in .env files.