Why does this update (or create) user statement fail?

I cannot get this user created using the syntax below; (or, if created, change their password as listed).

CREATE USER 'nextclouduser'@'localhost' IDENTIFIED BY '35KMMeiibw#=';

I receive this error: "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"35KMMeiibw"' at line 1."

(I get the same error when I try "Set PASSWORD FOR...." this existing user in the same format as above.)

I've tried all combinations of single and double quotes in both the user portion and the password portion; and it seems that these are not a valid statements for some reason.

What am I doing wrong?

thank you in advance.

chuck

Answer Answered by Ian Gilfillan in this comment.

No, the '#' character is fine to use in a password, and the statement you supply above also works fine if pasted into the command line on Ubuntu, just like the others. I am not sure why you are experiencing problems, perhaps a shell setting. You can test for yourself if the '#' character is causing a problem in your environment by removing it, but there is no reason I know of from MariaDB's side for this.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.