Results 1 to 7 of 7
-
07-12-2009, 04:26 PM #1Newbie
- Join Date
- Jul 2009
- Posts
- 16
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.
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???????
-
07-12-2009, 04:31 PM #2Junior Guru Wannabe
- Join Date
- Jul 2009
- Location
- Charlotte, NC
- Posts
- 42
Are you sure you didn't already set a password? You can do the following to reset it if you have:
/etc/init.d/mysqld stop
mysqld_safe --skip-grant-tables &
mysql -u root
mysql> use mysql;
mysql> update user set password=PASSWORD("newrootpassword") where User='root';
mysql> flush privileges;
mysql> quit
/etc/init.d/mysqld stop
/etc/init.d/mysqld start
-
07-12-2009, 05:31 PM #3Newbie
- Join Date
- Jul 2009
- Posts
- 16
um let me get back to you on that. I broke yum and now im reimaging the server.
-
07-12-2009, 07:21 PM #4Web Hosting Master
- Join Date
- Jun 2006
- Location
- NYC / Memphis, TN
- Posts
- 1,454
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?≈ PeakVPN.Com | Complete Privacy VPN | Cloud Hosting | Guaranteed Security | 1Gbps-10Gbps Unmetered
≈ PeakVPN | 31 VPN Servers | 17-Years Experience | Emergency 24/7 Support
≈ Visit us @ PeakVPN.Com (Coming SOON) | ASN: 3915
-
07-13-2009, 12:31 AM #5Disabled
- Join Date
- Jun 2009
- Posts
- 126
$ mysql --user=root -p
Enter password:
Try this .Hopefully it should work
-
07-13-2009, 02:39 AM #6Junior Guru Wannabe
- Join Date
- Apr 2004
- Location
- Germany
- Posts
- 37
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.
The correct syntax would have been:
mysqladmin -u root -pyourcurrentmysqlrootpassword password yournewmysqlrootpassword
-
07-14-2009, 01:43 PM #7Newbie
- Join Date
- Jul 2009
- Posts
- 16
Thanks for all your help guys i reset the password and now mysql works fine.
Similar Threads
-
DirectAdmin - Access denied for user 'apache'@'localhost' (using password: NO)
By Peers in forum Hosting Security and TechnologyReplies: 2Last Post: 06-20-2009, 01:22 AM -
Access denied for user 'root'@'localhost
By Greedisgood in forum Hosting Security and TechnologyReplies: 3Last Post: 06-08-2007, 09:46 AM -
Access denied for user 'root'@'localhost'
By MarsNIIT in forum Hosting Security and TechnologyReplies: 12Last Post: 04-14-2006, 04:11 AM -
ERROR 1045: Access denied for user: 'root@localhost'
By andy18 in forum Hosting Security and TechnologyReplies: 17Last Post: 12-13-2004, 07:19 AM -
ERROR 1045: Access denied for user: 'root@localhost
By titoboo in forum Hosting Security and TechnologyReplies: 2Last Post: 04-06-2003, 01:54 PM