All Collections
MySQL - Create user - Script #1929
MySQL - Create user - Script #1929
Updated over a week ago

When the customer is trying to create user, but is facing with denied privileges like:



$conn = new PDO(';dbname=v;', $user, $pass);

$sql = 'SELECT name FROM admins';

foreach ($conn->query($sql) as $row) {

echo $row['name'];


Even setting all privileges still produces an error. The user seems to be created, but apparently, he does not have access. It will not work even if the client uses IP instead of the node name or put the same password on all fields.


The problem is the host in the script specified, and left the host as is in phpMyAdmin (any host: %) and what created the problem was the "Authentication Plugin" item;

You need to select "MySQL native verification".

Did this answer your question?