How can I grant privileges in my MYSQL?
After Linux, Windows on one of the most used operating system that people like to choose and the reason behind it is that using the Windows-based operating system you can easily manage and handle your website. Not only that using Windows operating system allows you to install Microsoft application on your server. And today most of the people are using Windows operating system on their server.
Currently, if you are using a Windows dedicated server for your website and if you are looking for information on how to grant privileges on your MYSQL server then here is the solution. And if you are using Windows server for your website it does not allow grant privileges to it users via Plesk panel. But you no need to worry about it you can grant privileges via command line.
Follow the below steps to allow the grant privileges on your server:
>> Log into your SSH or Root access
>> Now Log into your MySQL by giving this command-
mysql -u admin -p`cat /etc/psa/.psa.shadow`
>> Once you enter the command you will see like this
>> Now enter the following database if the user already exists-
GRANT SELECT ON database.* TO user@'localhost';
>> And if you want to create a new user then run this command-
GRANT SELECT ON database.* TO user@'localhost' IDENTIFIED BY 'password';
>> If you want to enable more options then you need to separate them with a comma and now you need to enable SELECT, INSERT, and DELETE your syntax. And this is how it looks-
GRANT SELECT, INSERT, DELETE ON database TO username@'localhost' IDENTIFIED BY 'password';
>> Once after giving the privileges for your user, now you need to run this command in your MySQL command prompt-
>> Use the below command to see the list of privileges that have been granted to the user-
select * from mysql.user where User='username';