- I went to Cpanel, and from there created a user and a database with the option MySQL Databases in Cpanel.
- I inserted and created tables without any problem.
-
Now when I want to connect to it, with these parameters:
$servername = “127.0.0.1”;
$username = “aa”;
$password = “aa”;
$dbname = “bb”;
It says : Access denied for user ‘aa’@’localhost’ to database ‘bb’. even though I’ve created the user with the option MySQL Databases in Cpanel.
- I have to tell that I don’t see some options like, User Accounts, in phpmyadmin on my server. I tried some options, for example seeing users available (SELECT User…..), but It gave me an error to, because that user didn’t have privileges.
I have all kinds of access problems.
2
Answers
Creating a new User in cpanel with the option to have MySQL databases doesn’t necessarily create the database user itself. Make sure you use the MySQL Database Wizard in CPanel to set up your users.
If you run the mysql server in the same server your application is in, settings should be
also create the user and grant privileges to the user