Error connecting to MySQL: 1045 - Access denied for user

4 posts by 2 authors in: Forums > CMS Builder
Last Post: September 3, 2021   (RSS)

By daniel - September 1, 2021 - edited: September 1, 2021

Hi Andreas, 

This error typically indicates some sort of permissions issue in the database configuration. There are many ways this could happen, but the first things I would check are:

  • *That the username/password being used is correct
  • *The database user has the correct privileges to access the site's database

Let me know if you're able to make any progress, otherwise, I may have some other troubleshooting steps I can point you towards.

Thanks!

Daniel
Technical Lead
interactivetools.com

Thanks Daniel

It was my mistake. I just had missed to create the database in advance and then connect it to the CMSB. I wonder whether it would be possible to create the new database through the "One minute installation" page; if it had been possible, it would be easier for the novice user to do a quick and easy CMSB installation.

Kind regards

Andreas

By daniel - September 3, 2021

Hi Andreas,

CMSB should attempt to create a missing database if it doesn't exist and if the connecting user has the privileges to create databases. "Connect to database" and "create database" are different user permissions within MySQL, so it's possible to have users that work to connect but will not automatically create missing databases in this way. 

The way to change privileges in MySQL will differ depending on the environment and tools available, but commonly it can be done through PHPMyAdmin or directly with SQL commands (https://chartio.com/resources/tutorials/how-to-grant-all-privileges-on-a-database-in-mysql/)

Let me know if you have any other questions!

Thanks,

Daniel
Technical Lead
interactivetools.com