Creating a new user in Planetscale results in weird error

84 Views Asked by At

This might seem extremely simple for some, and usually works easilly for me, but I can't understand why it keeps failing. I've created a MySQL database on Planetscale, and I want to create a new user using mysql, I run this command that seems perfectly correct:

CREATE USER 'migration_user'@'%' IDENTIFIED BY 'complexpassword123';

But I constantly get this error:

Error Code: 1105. syntax error at position 12 near 'USER'

What is wrong with this command ? Normally it should just work.

1

There are 1 best solutions below

0
On

Planetscale is “MySQL compatible” but is not actually MySQL under the hood. It does not support using CREATE USER from the MySQL command line interface:

CREATE USER won't work on the MySQL command-line with a PlanetScale database.

Source

Use the Planetscale administration panel’s Password feature to generate a new user account with access to your database.