I'm battling with a strange issue here.
I am setting up an Amazon EC2 server, installed with Ubuntu Server 12 LTS, to serve our web app.
I installed mysql, and then had some issues with being unable to access with the root password I had set.
Suspecting a conflict with a possible default install (I thought I had checked), I completely removed mysql including the user.
Starting fresh, I set a root password which then worked. I set up phpMyAdmin, got that working, but then when trying to set a password for a user following an import,
I got "could not find row" error.
Upon some searching I found that 'FLUSH PRIVILEGES;' could help remedy the problem. So I went back into the server, logged into mysql as root, and performed the flush command.
I was then logged out of phpMyAdmin with an access denied error, and since then have been unable to log back into mysql on the server.
The full error is:
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)
I am quite confused, already spent a lot of time trying to find out what the problem could be. Any help would be much appreciated. Thanks in advance.
Ha! Use --databases and include only your DB:
http://dev.mysql.com/doc/refman/5.5/en/mysqldump-copying-to-other-server.html
This was caused by my data import being from a full mysqldump, which I did now know would contain all user tables including root, which therefore overwrote my root user.
I guess there is a way to prevent either the export or import of the mysql table somewhere.
Learn something new everyday, as they say..
Related
I need some assistance with my MySQL application (installed as part of the WAMP Server 3.0.0).
I suspect somewhere along the lines MySQL became corrupted. When trying to log on with my root account, I get the following error:
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using
password: ES)
I then followed the steps to reset the root password as per many of the Stackoverflow and MySQL guides but without any luck.
https://dev.mysql.com/doc/mysql-windows-excerpt/5.7/en/resetting-permissions-windows.html
Resetting MySQL root password not working
reset/change mysql root password
Picture
I suspect the only way forward is perhaps a reinstallation of MySQL, however, I only have the raw database files and not the most recent dump files. (Current dump files about 2 weeks old).
What are my options?
Is there something I overlooked?
Shall I proceed with new installation? If so, how do I restore the existing raw database files?
Appreciate any assistance.
Kind Regards
I'm trying to copy a live WordPress site to my local server. I went to import the database from the live site through MAMP, and I received an error message when trying to connect to phpMyAdmin:
#1045 - Access denied for user 'root'#'localhost' (using password: YES)
I have a couple local WP installations running already, and I'm able to access them through the localhost:8888/sitename path just fine.
I haven't changed any passwords or messed around with any configurations in phpMyAdmin. In fact, it was all working fine just yesterday. I had to re-boot my computer because it froze on me this morning, and that's when the issues began.
I even went into the config.inc.php file in Applications/MAMP/phpMyAdmin, and the usernames and passwords match what I had originally. (It definitely wasn't 'YES')
I'm stumped at this point. Could anyone help?
Can you try resetting the MySQL server password using this guide.
Then put the new password in the PHPMyAdmin config?
using password: YES Means that you attempted to login using a password, not that the password used is 'YES' Its referring to the different options for logins like certificates etc.
Try to use single quotes in password, cause the symbol $ inside double quotes is like aphp variable
change the password to a more basic form. for example i had "!##$]#$%^%&^" i changed it to "mypassword1" and it worked. It is a wordpress issues that it doesn't support weird characters.
I've looked everywhere an cannot seem to find a fix for this issue, despite tons of articles on it. Anyway, I'm attempting the following command
mysqldump -hlocalhost -uroot -p mydb mytable > myexportedtable.sql
This will occasionally result in the following error
mysqldump: Got error: 1045: Access denied for user 'ODBC'#'localhost' <using password:NO> when trying to connect
This is baffling for two reasons. One - I am specifying a root user in my command however it assumes I'm ODBC. Two - I only get this error occasionally. (more often than not). I am able to authenticate to the mysql interactive shell when specifying root but keep getting this error with mySQL dump. Any insight is greatly appreciated as I've been trouble shooting this for days now.
Type in the command manually. Sometimes copying and pasting the command changes the hyphen character (-). It is ignoring the username because it literally doesn't recognize a -u.
This seems to happen when you connect with the wrong user to the database, wrong password usage or when you connect from the wrong host or over the socket/port when you are not allowed to.
I suggest checking the access privileges of the user like:
mysql> SELECT user, host FROM mysql.user WHERE user = 'jake';
mysql> SHOW GRANTS FOR 'jake'#'localhost';
Perhaps also take a look at mysqlimport: Error: 1045, Access denied , which helped me a lot.
So i have gotten this error a couple times. Tried different things to solve it, but the solution continues to illude me. So far the only way i have managed to regain access to my local sql server is to remove the xampp installation, and reinstall it.
After reinstall i am able to access the mysql database no problems.
It would seem how ever, either after restarting the computer, or the new day,
This error comes up again.
At first, i was just using the root account with no password, config settings to match this,
and i would get the same error except it would say 'using password: NO'
i then uninstalled and reinstalled xampp and set a passsword to the root account. this worked fine the entire working day. I come back on monday, and try to access my local database,
i get, #1045 - Access denied for user 'root'#'localhost' (using password: YES)
Seeing as i cannot afford to continue to reinstalled every day, it would be greate if i could find a solution to this.
edit:
I forgot to mention i get the same error trying to access the mysql database through command prompt.
This was my own doing.
I run off mysql backups. Every time i import the backup, i import and override the mysql.user fields as well.
I just downloaded PHP and I tried running mySQL with the command:
C:\Program Files\EasyPHP-5.3.2i\mySQL\bin\mysql.exe
And I got the error:
ERROR 1045 (28000): Acess denied for user 'ODBC'#localhost' (using password: YES)
I found a solution online with linux, but I'm running vista on this machine and have no clue what all of that meant. Please help, I'm tired of using the school's terminals.
It means one of three likely things.
you need to either create a new user in mysql with the password you are using
set the password of the "ODBC" user to what you are using
grant permission to the host you are attempting to connect from, in this case localhost
Without more information to your specific setup it will be very difficult to answer with more accuracy.
Have you tried supplying the username to the command, for example:
C:\Program Files\EasyPHP-5.3.2i\mySQL\bin\mysql.exe -u root
?
Check the manual Connecting to and Disconnecting from the Server