Skip to main content
All CollectionsGeneralFAQ
MySQL - Create user - Script #1929
MySQL - Create user - Script #1929
Updated over a year ago

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

$user='read';

$pass='GBNxal71773';

$conn = new PDO('mysql:host=node55003-pogal-clone.j.scaleforce.net;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.

PROBLEM AND SOLUTION.

The problem is the host in the script specified node55003-pogal-clone.j.scaleforce.net, 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?