Domanda

GRANT ALL ON my-database.* TO my-user@10.0.0.1 IDENTIFIED BY 'password';
ERROR 1046 (3D000): No database selected

OK, ho creato un database con un "-" sul nome (ho fatto la stessa cosa sull'utente) ... quindi quando provo a impostare le sovvenzioni su di esso il database non funzionerà.

Se uso la base, l'errore è diverso

MariaDB [(none)]> use my-base
Database changed
MariaDB [my-base]> GRANT ALL ON 'my-base'.* TO 'my-user'@'10.0.0.1' IDENTIFIED BY 'password';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''my-base'.* TO 'my-user'@'10.0.0.1' IDENTIFIED BY 'password'' at line 1
MariaDB [my-base]> 

Nessuna soluzione corretta

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a dba.stackexchange
scroll top