MySQL "CREATE USER" on PythonAnywhere - mysql

I'm connecting with my MySQL database using my user and host listed in Databases tab. No problems with that.
But I want to create a new user for that database (the user that I will use to my app connect with the database), but when I tried CREATE USER statement, I got a permission error:
ERROR 1227 (42000): Access denied; you need (at least one of) the CREATE USER privilege(s) for this operation.
What I can do to accomplish that?
Thanks in advance.

Related

ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privilege(s) for this operation - on AWS Lightsail Mysql DB

I restored an AWS Lightsail DB (HA) from an emergency restore - and now I can't create functions or drop triggers, etc, when logged in as dbmasteruser - I receive this message:
Error Code: 1419. You do not have the SUPER privilege and binary
logging is enabled (you might want to use the less safe
log_bin_trust_function_creators variable)
I've tried the console statement: SET GLOBAL log_bin_trust_function_creators = 1; but get the access denied message.
Has anybody seen this before and know how to fix it? Much obliged.

#1227 - Access denied; you need the SUPER privilege for this operation - how to solve?

I am trying to change a SQL Variable through phpMyAdmin, and I get this error:
#1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation
Trying to solve this error has led me to this question here on StackOverflow. Unfortunately all of the proposed solutions do not seem to work for me:
Go to PHPMYADMIN > privileges > Edit User > Under Administrator tab Click SUPER. > Go
As you can see from the screenshot above, there is no "privileges" tab in my phpMyAdmin.
mysql> GRANT SUPER ON . TO user#'localhost' IDENTIFIED BY 'password';
When I try to execute code like this, I get further errors:
Access denied for user 'cpses_ajceej5cb1'#'localhost'
I have never heard of this cpses... user before, they certainly don't seem to exist anywhere. Here is a screenshot of the issue:
Given all of these set backs, how can I change a variable in phpMyAdmin?
In the end the only way I could edit these variables wasn't through phpMyAdmin at all - I had to alter them through cPanel.

MYSQL - copy table error / user permission error

I'm trying to copy a table from one database to another and I keep getting errors. I'm not sure which one to troubleshoot specifically or if I'm even going in the right direction. Any ideas?
CREATE TABLE _pw_users.items LIKE _users.items;
INSERT INTO _pw_users.items SELECT * FROM _users.items;
And I get this error:
CREATE command denied to user 'xxxxxx'#'localhost' for table 'items'
So I try to allow permissions with this:
GRANT ALL PRIVILEGES ON `_pw_users`.* TO 'xxxxxx'#'localhost'
And I get this error:
"#1044 - Access denied for user 'xxxxxx'#'localhost' to database '_pw_users' "
I'm not sure where I should go from here.

Unhandled exception: Error creating account

I'm trying to set up a database with MySQL and this error keeps popping up: Unhandled exception: Error creating account blank#blank. Error executing 'Access denied; you need (at least one of)the create user privileges for this operation.
I'm wondering if and how I can change my own account settings so that I'll be able to add new users again and be able to do other things. The program I'm currently using for this is MySQL workbench and I recently put the server onto a Microsoft web-matrix website. I'm not completely sure if that can cause any odd effects but I just want to be safe. Thanks guys.
Create a new connection in MySQL workbench with user root. Logon with that user in MySQL workbench and go to a Query window. Assuming you want to access everything and have all privileges, issue the following SQL statement. Replace 'you' with your username.
GRANT ALL PRIVILEGES ON * . * TO 'you'#localhost;
GRANT ALL PRIVILEGES ON * . * TO 'you'#'%';
That will give you pretty much everything.
Here is the Documentation

Can't alter MySql routine

I am logging in with my main DB user, into Phpmyadmin page/ workbench remote access application and I have permissions issues.
It all started when I tried to alter routines that I have stored in the DB. when trying to alter those routines from the workbench applications nothing just happens.
I can call these routines and execute them, but not alter or get to the scripts.
I searched for hours in distinct forums and get some answers regarding grant access commands
but then I got again permissions issues with error #1142 , command denied to user(main user).
I am really lost here, and already lost hours of work in order to get to the scripts of my routines.
one last note - I have created these routines while I was connected with the same user but from different remote connection (different IP address).
Would really appreciate the help.
here is a solution how I fixed this:
1) Add "mysql" database to the user, you are logged in with
Advice: now you can alter functions and procedures
2) Add the global privilege "SUPER" to your user
Advice: otherwise you will get the following error if you save the procedure/function: "ERROR 1227: Access denied; you need (at least one of) the SUPER privilege(s) for this operation"
CREATE DEFINER = 'admin'#'localhost' PROCEDURE account_count()
SQL SECURITY INVOKER
BEGIN
SELECT 'Number of accounts:', COUNT(*) FROM mysql.user;
END;
See the above example.
You need to login using super user and change the definer parameter in the procedure based on your new username and hostname. The same definer who created can edit the stored procedure.