Welcome Guest | Login

MySQL Error - 1227 Access Denied; you need SUPER privilege for this operation

When I try to execute a MySQL dump query to create all of my tables, views and stored procedures I get the error "1227 Access Denied: you need SUPER privilege for this operation."
The error occurs on the creation of the stored procedures and views.


Here is a sample of the view creation query.

-- ----------------------------
-- View structure for bunches
-- ----------------------------

CREATE ALGORITHM=UNDEFINED DEFINER=`xyzuser`@`localhost` SQL SECURITY DEFINER VIEW `bunches` AS select `bunch`.`BunchID` AS `id` from `bunch`;

2008-02-06 01:32 PM

Rithm, LLC
Are you using your cPanel username in place of 'xyzuser'?

2008-02-06 02:13 PM

yes, using my cpanel user name in place of 'xyzuser'.

still have the same problem.

2008-02-06 02:21 PM

Rithm, LLC
i am using navicat to connect remotely to the mysql db

OK, I was able to use myPHPAdmin to create the views but could not do it remotely.  

It may require an SSH connection but I could not get the SSH connection to mysql to work.  

I found a couple of threads on the SSH issue that weren't resolved.
http://www.hostingrails.com/forums/deployment_troubleshooting_thread/247

has anyone made any headway on connecting to mysql remotely using SSH?

This may be the only way to create views

2008-02-06 02:33 PM

Rithm, LLC
Did you add your global IP in cPanel-->Mysql Databases-->Access Hosts? Also refer http://www.navicat.com/mac_manual_html/ssh_tunnel.htm to connect using ssh.

2008-02-06 05:06 PM



I set the allowed IPs for MySQL to %, which should let everything in, then I tried my exact IP address, neither worked. I am on a windows box.



I continue to get the following Error:

SSH Server not responding

2008-02-08 02:36 PM

Rithm, LLC
Hi - It seems to be a IP block at the server firewall. Please post a ticket to the suppot team with your  global IP by accessing the link http://whatismyip.com . We will check it and get back to you.

2008-02-09 04:32 AM

HostingRails Support
Brent,

I'm getting the same problem with MySQL not allowing the CREATE VIEW statement. I've enabled every permission available in the cPanel, and have no trouble doing other selects, updates or creating tables.

I also discovered this while restoring the database from a dump file, and 'DROP VIEW IF EXISTS' runs just fine -- so now my view is gone.

I get "Access Denied: you need SUPER privilege for this operation." whether from the command line or a client.

2008-02-13 10:15 PM

My problems were mostly resolved using an SSH connection.  You're user must be interpreted from a trusted host which I am using 'localhost' for my mysql connection along with SSH tunnel.


Make sure you have omitted DEFINER, or are connected to mysql with the same user account as the DEFINER specified on your CREATE views and CREATE stored procedure statements.

for example:

CREATE ALGORITHM=UNDEFINED DEFINER=`xyzuser`@`localhost` SQL SECURITY DEFINER VIEW `bunches` AS select `bunch`.`BunchID` AS `id` from `bunch`;

you must be SSH or cpanel connected as `xyzuser`@`localhost` for this to work correctly in a shared hosting environment.

otherwise try

CREATE VIEW `bunches` AS select `bunch`.`BunchID` AS `id` from `bunch`;

2008-02-13 10:38 PM

Rithm, LLC

Hello Guest! In order to post you must be an active client with us, please log in or sign up today!