var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Im trying to setup a mysql server on my centos vps server. Ive installed mysql server and done chkconfig and the mysql server has started. My problems start when i want to set a mysql root password.
I get an error "ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)"
mysqladmin -u root password yourrootsqlpassword
mysqladmin -h server1.example.com -u root password yourrootsqlpassword
Which i totally dont understand because why would it want a password when im trying to set the password???????
Are you sure you didn't already set a password? You can do the following to reset it if you have:
mysqld_safe --skip-grant-tables &
mysql -u root
mysql> use mysql;
mysql> update user set password=PASSWORD("newrootpassword") where User='root';
mysql> flush privileges;
um let me get back to you on that. I broke yum and now im reimaging the server.
Re-imaging because yum broke?
Anyway as eeg3 mentioned, try resetting the password otherwise this could be a permissions issue. What are the logs showing?
REAL DDoS Protection | Cloud Hosting | VPS | Dedicated Servers | High Bandwidth Hosting | 1Gbps-10Gbps Unmetered ≈ FiberPeer DDoS Mitigation | ethProxy Upgraded!
14-Years Experience | Emergency 24/7 Support
≈ Visit us @ www.fiberpeer.com
$ mysql --user=root -p
Try this .Hopefully it should work
Your command sytax was incomplete. You already have a root password set. As such, to change this password, you must also provide the current password to set a new one.
Originally Posted by
The correct syntax would have been:
However, you should not spell out your root password on console. Instead, either make mysql prompt you for it or note it down into ~/.my.cnf or /etc/my.cnf and limit access to these files (chmod/chown).
mysqladmin -u root -pyourcurrentmysqlrootpassword password yournewmysqlrootpassword
Thanks for all your help guys i reset the password and now mysql works fine.
By Peers in forum Hosting Security and Technology
Last Post: 06-20-2009, 01:22 AM
By Greedisgood in forum Hosting Security and Technology
Last Post: 06-08-2007, 09:46 AM
By MarsNIIT in forum Hosting Security and Technology
Last Post: 04-14-2006, 04:11 AM
By andy18 in forum Hosting Security and Technology
Last Post: 12-13-2004, 07:19 AM
By titoboo in forum Hosting Security and Technology
Last Post: 04-06-2003, 01:54 PM