+421-911 749 104 office@jumisoft.eu
A Database Error Occurred
Error Number: 1045

Access denied for user ‘xxx’@’localhost’ (using password: YES)

  • Are you using MySQL or MariaDB?
  • Do you have used in your database  views, trigers or stored programs?
  • Are you developing on more environments (e.g. LOCAL, TEST a PROD)?
  • Do you sometimes exporting and importing DUMP for your DB from one environment to another?

If yes, please be careful about an attribute DEFINER related to MySql Access Control and which is optional but it is automatically added to exported SQL when you creating a DUMP. It will cause the error mentioned above when you import the DUMP to different environment (e.g. different DB name or user).

Solution:

Open your DUMP in some text editor and remove all the parts related to DEFINER.

Examples:

 

remove-definer-2