Can not set up custom user in XAMP for CakePHP


#1

I’m using cakephp project with development environment: XAMP 7.1.9 with PHP Version 7.1.9 and 10.1.26-MariaDB via phpMyAdmin.

The problem is that I can not using custom user and password for cakephp project because cakephp can not connect with this credentials to database. But it works if I using root without a password which is default for the database installation.

I used the same password in database credentials and in cakephp project setup file but for some reason it does not work except for root user.

So is it related in some way with MariaDB ? How can I fix it?

CakePHP is NOT able to connect to the database. Connection to database could not be established: SQLSTATE[HY000] [1045] Access denied for user ‘cakephp’@‘localhost’ (using password: YES)


#3

When I had this problem I checked the followings:

  1. Has custom user all Privileges?
  2. Have I enabled login option in phpmyadmin?

and by giving all the privileges to my custom user and also enabling login in phpmyadmin, I solved this problem.


#4

setting localhost as permission in db was solved the issue