Unable to create the MySQL database on linux server

575 Views Asked by At

I have only one user. I am logged with the same user and tried to create the database and getting the following error.

ERROR 1044 (42000): Access denied for user 'csatsurvey'@'localhost' to database 'demo'

By the above error I understood that I am have some access issues. How can I grant the permissions and crate the database with the same user.

enter image description here

1

There are 1 best solutions below

2
On

step 1: login to your mysql -u root -p

step 2: basic syntax to permission "GRANT permission ON database.table TO 'user'@'localhost';"

step 3: To grant any specific permission GRANT CREATE ON . TO 'testuser'@'localhost'; CREATE is a permission

to more details visit to http://www.liquidweb.com/kb/grant-permissions-to-a-mysql-user-on-linux-via-command-line/