ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Centos, knoppix, Fedora, Mepis, Zenwalk, Mint
Posts: 142
Rep:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
am having trouble with mysql i just installed fedora 5.
am able to log in to mysql by typing the password:
mysql -p or mysql -u root -p.
but if i try to log in without a password :
# mysql or mysql -u root.
i get an error message ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
i have run the cmd mysql> set password for 'root'@'localhost' = password ('new-password');
but still the error persists am trying to intall phpmyadmin which gets the same error therefore i have put on hold installing any apps that require a database till i sort this out.
so i think m question is how do i enable mysql to let this cmd to work: mysql -u root.
You appear to be saying that you've set a password, and that mysql won't let you login without providing that password. That is how it is supposed to work.
If you are saying that you have set the password to a blank string, then this is not the same as turning off the password checking.
It's possible to set it up so that you don't need a password, but that is not advisable, particularly for the administrator.
If you need to run a command that needs the password on the commandline then you can use --password=<thepassword>
although this is less secure then entering it when prompted as the password will can be obtained by looking at the running processes. If you have set the password to be blank then use --password=""
phpmyadmin does not need to know the password, depending upon the authtype you choose. The default on my install is cookie, which means that you need to login using the username and password from the phpmyadmin login page.
It is really not a good idea to disable the password so I haven't given instructions on how to do it, but you can work it out from the mysql documentation.
Last edited by penguintutor; 06-30-2006 at 04:39 AM.
Distribution: Centos, knoppix, Fedora, Mepis, Zenwalk, Mint
Posts: 142
Original Poster
Rep:
Hi,
Turned out i was doing the wrong thing as i was supposed to edit config.default.php and save as config.php in phpmyadmin root directory and my problems were solved. But I was leaving it in the original folder.
As for the exact fields to edit I will look for a link on configuring phpmyadmin and add it here, or you can try googling it and see if you get anything.
Distribution: Centos, knoppix, Fedora, Mepis, Zenwalk, Mint
Posts: 142
Original Poster
Rep:
This are the main editing areas.
$cfg['blowfish_secret'] = 'UHDWDHWUUI54656547igjglkk5677H' ->change this value to any random characters you want to use. Note you only need this if you are going to use the cookie auth_type.
/* Servers configuration */
$cfg['Servers'][$i]['host'] = 'Localhost'
$cfg['Servers'][$i]['extension'] = 'mysqli'; -> or mysql wichever you want to use
$cfg['Servers'][$i]['port'] = 'your port'; ->leave blank for default
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
As Linux having its own security policies so when you try to go for Sql then keep in mind you must have proper authentication according to your configuration setting.
I do not think so here is problem other than proper authentication.
Friggin' finally! I wish I had read this post 7 hours ago.... I don't even know what caused the error.. All I was doing was cleaning up databases & tables... guess I deleted the wrong one >.>....
Thank you, sir!
Sorry for the gravedig... but I had to thank this guy.
Quote:
Originally Posted by shridarshan
Hi Guys,
Issue:- ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.