I am a newbie on web hosting. I can manage to access the website however when I submit login this error appear…
PDOException in MySqlConnector.php line 41:
SQLSTATE[#4200]: <>: 1044 Access denied for user ‘xxx’@’%’ to database ‘xxx
;’
.env file
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=xxx
DB_USERNAME=xxx
DB_PASSWORD=xxx
MySqlConnector.php file
// Next we will set the “names” and “collation” on the clients connections so
// a correct character set will be used by this client. The collation also
// is set on the server but needs to be set here on this client objects.
if (isset($config[‘charset’])) {
$charset = $config[‘charset’];
$names = "set names '{$charset}'". (! is_null($collation) ? " collate '{$collation}'" : '');
$connection->prepare($names)->execute(); //This is line 41 }
Screenshot of problem exception