I'm playing around with MySQL and Django and I'm having some trouble because I'm new to this.
I'm trying to run the command:
python manage.py sql login
to add login to my apps and I get the error:
OperationalError: (1044, "Access denied for user 'classdummy'#'localhost' to database 'classydummy'")
I tried looking for the database 'classdummy' and user 'classdummy'#'localhost' but I didnt see them so I tried to create both
I was successful in creating a database named 'classdummy' but when I try to create a user named 'classdummy'#'localhost' I get this error:
ERROR 1396 (HY000): Operation CREATE USER failed for 'classdummy'#'localhost'
I'm not sure if I'm doing all this correctly
Thank you for all the help!
if you can login to mysql as a privileged user, you can run a grant command:
grant all privileges on classdummy.* to 'classdummy'#'localhost' identified by 'mypassword123z';
Related
I created a schema and granted its permission to a specific user:
GRANT ALL PRIVILEGES ON USED_CARS.* TO ANDREW#LOCALHOST;
The database is created with root user and then granted these permissions to another user. now when I swith to another account I can list the schema with SHOW SCHEMAS; query however cannot switch to that DB with use USED_CARS; query.
Following error pops up:
ERROR 1044 (42000): Access denied for user 'ANDREW'#'localhost' to database 'USED_CARS'
What am I missing here? Thanks for the help in advance.
Sometimes depending on the configuration of server, you can use localhost or the ip:127.0.0.1
Could you try with this ...
GRANT ALL PRIVILEGES ON USED_CARS.* TO 'ANDREW'#'%';
I m trying to create new database through mysql or ssh but on both m getting error
mysql : CREATE DATABASE porto;
Error : Access denied for user 'root'#'localhost' to database 'porto' on ssh : ERROR 1044 (42000): Access denied for user 'root'#'localhost' to database 'porto'
mysql> CREATE USER 'testuser'#'localhost' IDENTIFIED BY 'ecomaddon#42';
ERROR 1227 (42000): Access denied; you need (at least one of) the CREATE USER privilege(s) for this operation
mysql> SELECT User,Host From mysql.user;
ERROR 1142 (42000): SELECT command denied to user 'root'#'localhost' for table 'user'
Its problem of privilege but don't know how give root user all privilege ai had try all methods but got nothing.
You can try to access as root
mysql -h 127.0.0.1 -P 3306 -u root -p
If it still does not work follow this guide
https://www.a2hosting.com/kb/developer-corner/mysql/managing-mysql-databases-and-users-from-the-command-line
you may be login as root but the root#localhost is not allowed for the actions you are executing.
mysql>CREATE USER 'root'#'localhost' IDENTIFIED BY 'enter_your_password_here';
mysql>exit
then try logging-in again
I think it's rights issue & It can be resolved by re configuring again. Here's a steps to reconfigure it.
Stop the current MySQL server instance:
sudo service mysql stop
Use dpkg to re-run the configuration process that MySQL goes through on first installation. You will again be asked to set a root password.
sudo dpkg-reconfigure mysql-server-5.5
Thanks for reply to all
i had solve i
1. first login to new user.
2. give access all to that users by update command .
3. drop root user and rename second user to root.
main problem was : when we create root it didn't give grant_priv field access users .
I am getting below error while adding any user in opensips
MySQL ERROR 1045 (28000): Access denied for user
'opensips'#'localhost' (using password: YES) info: user 1234 already
exist
Please help me to resolve
1234 user is already exist into mysql subscriber table. So it is not
allowing to add similar one again. Just delete the 1234 user from
subscriber table from kamailio database and then try again.
It's 99% mysql level issue.
Check "etc/opensips/opensipsctlrc" file if it has right users and passwords for db.
Then try to create db with "opensipsdbctl create anydb"
Then try to use created db for manage opensips users.
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.
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/
I've created a user (1caap) in mysql root account and given read only privileges for this user to one of my database. Now my client(1caapuser) is unable to access this database. I've established the connection using Workbench. He's getting the following error when he's trying to access this database using DBVisualizer:
An error occurred while establishing the connection:
Type: java.sql.SQLException Error Code: 1045 SQL State: 28000
Message:
Access denied for user '1caapuser'#'x.x.x.x' (using password: YES)
Please help me out if i'd missed any settings at the earliest.
To resolve this issue you have to grant all privileges on database with identified by the password
Command to run:
GRANT ALL PRIVILEGES ON yourDBname.* TO username#'%' IDENTIFIED BY 'password';
Check the following for more details about the error you get:
http://dev.mysql.com/doc/refman/5.1/en/access-denied.html
https://dev.mysql.com/doc/refman/8.0/en/error-access-denied.html
You must most likely grant proper access for the user at the given IP address/host name. Such as:
grant on . to ''#'';
Check the users guide which specific privileges and what target objects to grant. The important clause above is that you need to specify 'user'#'ip-address'.
Again, check the users guide as there may be a collection of reasons for the error you get.