SOLVED You Need Super Privileges for this operation

warmwhisky

Member
Nov 13, 2017
9
0
1
Swaziland
cPanel Access Level
Root Administrator
Regarding the below quote. Please can you explain how and where I do this?

I have logged in to SSH as root then executed "mysql -uroot -p"
then executed the below, but it still doesn't work. I have changed the dummy text to my credentials and db. The error I receive is
Incorrect usage of DB GRANT and GLOBAL PRIVILEGES

I have also tried this
Code:
GRANT ALL ON DB_NAME.* TO 'USER'@'HOST' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION;
But it says zero rows effected

I have also tried this
Code:
GRANT SUPER ON DB_NAME.* TO [email protected]'localhost' IDENTIFIED BY 'PASSWORD';
Again zero row effected

How do I create and run stored procedures in my app? It works fine on my local copy.


Hello :)
Are you able to log in as the root user for this MySQL server? If so, you can enable the privilege by executing the following command from MySQL shell.

mysql> GRANT SUPER ON dbname.* TO [email protected]'localhost' IDENTIFIED BY 'password';

mysql> FLUSH PRIVILEGES;

Do remember to change the dummy values such as dbname, user, password etc. with actual values.
 
Last edited:

rpvw

Well-Known Member
Jul 18, 2013
1,101
460
113
UK
cPanel Access Level
Root Administrator

warmwhisky

Member
Nov 13, 2017
9
0
1
Swaziland
cPanel Access Level
Root Administrator
My mistake,

I already had the permissions to create procedures. But when I exported my procedure from my local machine I picked up a DEFINER that had an incorrect user "root" attached. I removed the DEFINER and the procedure was created successfully.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,224
463
Hello,

I'm glad to see you were able to solve the issue. Thank you for sharing the solution.