I had installed lamp server in my Ubuntu 12.04 box when I tried to access MySQL I got this bug
ERROR 1045(28000) I tried many solution available in the internet nothing works.
These are all my bash scripts I had tried to access it :
root#sampath-codyowl:~# mysql -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)
root#sampath-codyowl:~# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)
First try this
mysql -h 127.0.0.1 -u root -p
If that worked then add root#localhost
GRANT ALL PRIVILEGES ON *.* TO root#localhost IDENTIFIED BY 'root-password' WITH GRANT OPTION;
Other reasons:
Check if there is a firewall blocking your mysql port(mysql default is 3306)
Make sure that the server has not been configured to ignore network connections. look for --skip-networking, or --bind-address flags.
Check this article : http://dev.mysql.com/doc/refman/5.0/en/access-denied.html
Related
I have accidentally did some thing in MySQL database and broke MySQL.
:~# mysql -u root
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: NO)
:~# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)
tried all the possible solution but still couldn't able to login to MySQL.
I have tried reinstall the package still same error.
Seems like you haven't configured mysql completely, try:
mysql_secure_installation
I am trying to copy an SQL database from the folder using this command:
sudo mysql -u root globe_bank
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: NO)
sudo mysql -u root -p globe_bank
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)
I rang apple support and we changed the password of the root directory, they confirmed it was successful still getting this message. I have tried a few of the suggestions on similar threads, and mostly I get command not found.
When I type in mysql my connection ID is 19.
Any ideas or help is appreciated
I have faced the same issue on mysql Ver 15.1 on Amazon Linux 2 and the following worked for me:
Try entering the password on the same line.
I.e. instead of $mysql -u root -p, pressing Enter and then entering password after the prompt, do this:
$mysql -u root -p\<password>
Remember there is no "space" between -p and \<password>, I think you have got a space there!
I have two nodes: node1 and node2. I want to access MySQL installed on node1 from node2.
I have so far tried using grant all privileges on *.* to 'mysql'#'node2.openstacklocal' with grant option; on MySQL but I still get the below error:
===ERROR===
[mysql#node2 ~]$ mysql -p -h mgmt.openstacklocal -u mysql -P 3306
Enter password:
ERROR 1045 (28000): Access denied for user 'mysql'#'node2.openstacklocal' (using password: YES)
I guess I got the solution
Login to mysql
Run command
grant all on mysql.* to '<remoteuser>'#'node2.openstacklocal' identified by 'password';
Note - Notice this command is missing word 'privileges'
I cant start mysql server on local machine.
Run mysql start, display error:
ERROR 1045 (28000): Access denied for user 'username'#'localhost' (using password: NO)
How solve this issue?
try entering
mysql -uroot -p
it will ask you to put in your password then
it looks like your MySql is running
and if that doesnt work do
mysql start -uroot -p
alternatively look at this https://coolestguidesontheplanet.com/start-stop-mysql-from-the-command-line-terminal-osx-linux/
HI guys I got this Error and after Looking Around, the suggestion is that the password is wrong but I do not Understand how the Password Can be wrong because I can connect using the same details using phpMyadmin. Why should the Commandline give me this error?
I have been connecting using the command:
mysql -h db.gatungo.gskool.com -u mungai -p
Enter password: **********
ERROR 1045 (28000): Access denied for user 'mungai'#'212.22.177.50' (using password: YES)
Try to change hostname to localhost or 127.0.0.1.
I don't believe hostname is a valid host.
Note that you also have the username as usernamei
mysql -u usernamei -h localhost -p
Also make sure you have access from outside for that user:
GRANT USAGE ON *.* TO 'mungai'#'%' IDENTIFIED BY 'YOUR_PASSWORD';