advancedfuture Posted November 12, 2008 Share Posted November 12, 2008 So I setup a database in mysql, everything runs no problems, and the web application is connecting and pulling from the database no problem. Now I SSH into my server today because I want to setup a new database. root@air629# mysql -USER root -p Enter Password: ******** Error 2002 (HY000): Can't Connect to local MySQL server through socket 'ER' (2) root@air629# mysql Error 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) OKAY! This is bizzare.. my web app connects to the database using root login and it works no problems, yet I can login through the command prompt. It was working no problems 2 days ago the last time I logged in. Any ideas whats wrong, and what I can do to regain access to my databases? ERROR 1045 (28000): Quote Link to comment https://forums.phpfreaks.com/topic/132486-solved-i-think-im-locked-out/ Share on other sites More sharing options...
Mchl Posted November 12, 2008 Share Posted November 12, 2008 Is this a remote server? It might be possible, that no remote access is allowed to MySQL (common setting on webhosts) But stilll... if it was working 2 days ago? Quote Link to comment https://forums.phpfreaks.com/topic/132486-solved-i-think-im-locked-out/#findComment-688866 Share on other sites More sharing options...
advancedfuture Posted November 12, 2008 Author Share Posted November 12, 2008 I am logged in locally through SSH. and also too the website is hosted locally on the server, using the same login credentials and works fine. Quote Link to comment https://forums.phpfreaks.com/topic/132486-solved-i-think-im-locked-out/#findComment-688868 Share on other sites More sharing options...
corbin Posted November 12, 2008 Share Posted November 12, 2008 root@air629# mysql -USER root -p Enter Password: ******** Error 2002 (HY000): Can't Connect to local MySQL server through socket 'ER' (2) root@air629# mysql Error 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) Looks like you're getting a socket error, and then you're not supplying a password.... Try: mysql -hlocalhost -uroot -p Quote Link to comment https://forums.phpfreaks.com/topic/132486-solved-i-think-im-locked-out/#findComment-688909 Share on other sites More sharing options...
advancedfuture Posted November 12, 2008 Author Share Posted November 12, 2008 Corbin! Thanks a million that worked! I'm back in! Any idea as to why it would have locked me out all of the sudden? Quote Link to comment https://forums.phpfreaks.com/topic/132486-solved-i-think-im-locked-out/#findComment-688967 Share on other sites More sharing options...
corbin Posted November 13, 2008 Share Posted November 13, 2008 Because mysql defaulted to sockets, and you didn't have sockets configured right. Then when you used mysql alone, you didn't provide a password. The errors were pretty self explanatory x.x. Quote Link to comment https://forums.phpfreaks.com/topic/132486-solved-i-think-im-locked-out/#findComment-688984 Share on other sites More sharing options...
advancedfuture Posted November 13, 2008 Author Share Posted November 13, 2008 well thank you very much for all your help it is greatly appreciated Quote Link to comment https://forums.phpfreaks.com/topic/132486-solved-i-think-im-locked-out/#findComment-689006 Share on other sites More sharing options...
corbin Posted November 13, 2008 Share Posted November 13, 2008 No problem. Quote Link to comment https://forums.phpfreaks.com/topic/132486-solved-i-think-im-locked-out/#findComment-689047 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.