October 1, 2015

User creation in Mysql where dbname consist hyphen

We can create a user that consists of no special character at ease.

mysql>  create user 'abc'@'localhost' identified by 'redhat';

But to create a user for a database which consists of special character we follow this:-

mysql> grant all privileges on `Emp-Kolkata`.* to soumya@'localhost' identified by 'redhat';

mysql> grant all privileges on `Emp-Kolkata`.* to soumya@'%' identified by 'redhat';

mysql> flush privileges;

So the above command shows how to create a user for a dbname that consists hyphen in it and we granted all privileges to that user for both localhost and remote location.




Please share your ideas and opinions about this topic.

If you like this post, then please share with others.
Please subscribe on email for every updates on mail.

No comments:

Post a Comment

Oracle Database 26ai Installation Using RPM on Oracle Linux 9 (OEL 9) – Step-by-Step Guide

  In this post I will describe the installation of Oracle Database 26ai 64-bit on Oracle Linux 9 (OL8) 64-bit. The installation requires a m...