ERROR 1044 (42000) : Access denied for user ' '#localhost to database - mysql

Having trouble logging in and accessing my database. Currently using Windows 10 EasyPHP 13.1
I tried logging into my database. Using
"C:\Program Files (x86)\EasyPHP 13.1\binaries\mysql\bin\mysql.exe" -u jim -p;
An error message appeared saying
WARNING: Using a password on the command line interface can be insecure
ERROR 1045 (28000): Access Denied for user 'jim'#'localhost' (using password: YES).
Then I tried
"C:\Program Files (x86)\EasyPHP 13.1\binaries\mysql\bin\mysql.exe" -u jim;
This logged me in. However, I still cannot access the database.
Whenever I type the following command.
USE publications;
I get the error
ERROR 1044 (42000) : Access denied for user ' '#localhost to database 'publications'
I have even tried the following
GRANT ALL ON publications.* TO 'jim' IDENTIFIED BY 'mypasswd';
and
GRANT ALL ON publications.* TO 'jim'#'localhost' IDENTIFIED BY 'mypasswd';
and
GRANT ALL PRIVILEGES ON *.* TO 'jim'#'localhost' WITH GRANT OPTION;
as recommended at mysql> use mysql; but ... ERROR 1044 (42000): Access denied for user '' # 'localhost' to database 'mysql'
Even Logging in as a -u root won't let me access the database. I'm at a loss as to what the problem might be. Any ideas?

Try this:
"C:\Program Files (x86)\EasyPHP 13.1\binaries\mysql\bin\mysql.exe" -ujim
Notice i remove spaces between -u and jim

Try this:
GRANT ALL ON *.* TO 'jim'#'%' IDENTIFIED BY 'mypasswd';
FLUSH PRIVILEGES;

Related

mysql privileges are not working correctly

I executed,
grant all privileges on mythconverg.* to 'mythtv'#'localhost' identified by 'mythtv';
however when I execute,
mysql -u mythtv -p -h localhost mythtvconverg
I get,
ERROR 1044 (42000): Access denied for user 'mythtv'#'localhost' to database 'mythtvconverg'
It's not supposed to work this way but it is, what's wrong?
to solve, ERROR 1044 (42000): Access denied for user 'mythtv'#'localhost' to database 'mythtvconverg'
you need to reboot

Super User Privilege to MySQL user

I am trying to give super user privilege to MySQL user by executing below command
GRANT SUPER ON *.* TO indiaski_app#'localhost' IDENTIFIED BY 'appsocial'
But I am getting following error -
1045 - Access denied for user 'indiaskinexam'#'localhost' (using password: YES)
You don't have access to database with the user 'indiaskinexam'. Your password is wrong, that means you can't execute SQL-statements.

How to create a user and assign a password in mysql

What is going on with the below? Why will mysql not let me in? I am using 5.6
root#ip-10-93-145-98:/home/ubuntu# echo "grant all privileges on *.* to 'really'#'%' identified by 'stupid';" | mysql -u root -ptest101
Warning: Using a password on the command line interface can be insecure.
root#ip-10-93-145-98:/home/ubuntu# mysql -u really -pstupid
Warning: Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'really'#'localhost' (using password: YES)
Run a FLUSH PRIVILEGES after the GRANT ...
Try to login again after that.

MySQL server access denied while connecting

I have installed Mysql on Mac os 10.7 using dmg installer, it got installed at location /usr/local/mysql I also installed MySQL.prefpane, where I can start and stop the server using services.
i am facing below problems.
mysql> create database test ;
ERROR 1044 (42000): Access denied for user ''#'localhost' to database 'ets'
same happens when I am trying to invoke mysql by using below command
./mysql -u root root
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: NO)
Even when I created a connection using Eclipse to mysql db then also I got similar kind of exception.
Just want to know after installation do I need to make any further configuration related to user management and access privileges?
Try this,
./mysql -uroot -pPassword
To give the user all priviliges, execute this command:
GRANT ALL PRIVILEGES ON *.* TO root#'%' IDENTIFIED BY PASSWORD 'yourpassword' WITH GRANT OPTION
Also try
CREATE SCHEMA test;

can access my sql without using password but cannot access with password

I create a new mysql user by using
CREATE USER 'new-username'#'localhost' IDENTIFIED BY 'new-password';
GRANT ALL ON *.* TO 'new-username'#'localhost' WITH GRANT OPTION;
And I can access mysql by
mysql -u new-username
But I got this error message when I try to access mysql using password
mysql -u new-username -p
error message
ERROR 1045 (28000): Access denied for user 'new-username'#'localhost' (using password: YES)
Something I am missing? Mysql version is Server version: 5.5.24-0ubuntu0.12.04.1 (Ubuntu)
Thanks
Here you required to pass password but you dont have entered any password.
CREATE USER 'new-username'#'localhost' IDENTIFIED BY 'new-password';
GRANT ALL ON *.* TO 'new-username'#'localhost' WITH GRANT OPTION;
mysql -u new-username -p new-password
And if you want to remove password from that then just use following line
SET PASSWORD FOR 'new-username'#'localhost' = ''