Your HostICan Community  


Go Back   Your HostICan Community > HostICan Web Hosting > Virtual Private Servers (VPS)

Virtual Private Servers (VPS) Need help with your VPS plan on HostICan? Please feel free to ask and we'll give you the answers!

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-06-2007, 07:58 PM
lnxcode's Avatar
lnxcode lnxcode is offline
The British Kid
 
Join Date: Sep 2007
Location: Richmond, VA
Posts: 2,012
Send a message via AIM to lnxcode Send a message via Skype™ to lnxcode
Default How To: MySQL Error "Access denied for user..."

Are you getting ?

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

How do you fix the above?

From SSH, you will do the below commands:
  • service chkservd stop
  • service mysql stop
  • vi /mysql.recover
  • #add the following line to /mysql.recover and change MyNewPassword to the password that you want
  • SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPassword');
  • chmod 777 /mysql.recover
  • mysqld_safe --init-file=/mysql.recover &
  • service mysql stop
  • rm -fv /mysql.recover
  • service mysql start
  • service chkservd start
  • the root pass is in /root/.my.cnf
You should be all set!
__________________
Thanks,

Denis Motova
Affiliate / Operations Manager

HostICan Answers | Become a HostICan Affiliate | Create a Support Ticket.
Reply With Quote
  #2  
Old 11-07-2007, 12:40 AM
baghdad4ever baghdad4ever is offline
Banned
 
Join Date: Oct 2007
Posts: 142
Default

thanks denis

i counter this before one month

but HIC fix it to me
Reply With Quote
  #3  
Old 07-10-2008, 08:41 AM
jcarvin's Avatar
jcarvin jcarvin is offline
Junior Member
 
Join Date: Feb 2008
Posts: 19
Default Similar problem - can't access SQL by php

Quote:
Originally Posted by lnxcode View Post
Are you getting ?

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

How do you fix the above?

From SSH, you will do the below commands:
  • service chkservd stop
  • service mysql stop
  • vi /mysql.recover
  • #add the following line to /mysql.recover and change MyNewPassword to the password that you want
  • SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPassword');
  • chmod 777 /mysql.recover
  • mysqld_safe --init-file=/mysql.recover &
  • service mysql stop
  • rm -fv /mysql.recover
  • service mysql start
  • service chkservd start
  • the root pass is in /root/.my.cnf
You should be all set!
I am not getting a ERROR 1045 (28000):
but I am getting Access denied for user 'root'@'localhost' (using password: YES)

I tried to set up a drupal site. I created the DB, uploaded the files for the site I had been working on from my local server, then imported my DB to the DB I created, through cPanel.

Unfortunately, I cannot remember my password. I thought I had it right. And I've tried a bunch of combinations to no avail. I suppose I could just delete the whole thing and recreate a db, but had this been a site that had been in use and then I had to upgrade drupal and I forgot my password, I would want to reset the password instead of deleting and reuploading the whole site and DB.

I'm not a geek. I don't understand what SSH is or how to access it, or whether that is how to solve my problem. Please help. I'm locked out!
Reply With Quote
  #4  
Old 07-10-2008, 09:42 PM
lnxcode's Avatar
lnxcode lnxcode is offline
The British Kid
 
Join Date: Sep 2007
Location: Richmond, VA
Posts: 2,012
Send a message via AIM to lnxcode Send a message via Skype™ to lnxcode
Default

Quote:
Originally Posted by jcarvin View Post
I am not getting a ERROR 1045 (28000):
but I am getting Access denied for user 'root'@'localhost' (using password: YES)

I tried to set up a drupal site. I created the DB, uploaded the files for the site I had been working on from my local server, then imported my DB to the DB I created, through cPanel.

Unfortunately, I cannot remember my password. I thought I had it right. And I've tried a bunch of combinations to no avail. I suppose I could just delete the whole thing and recreate a db, but had this been a site that had been in use and then I had to upgrade drupal and I forgot my password, I would want to reset the password instead of deleting and reuploading the whole site and DB.

I'm not a geek. I don't understand what SSH is or how to access it, or whether that is how to solve my problem. Please help. I'm locked out!
If you setup the database via cPanel - just remove the username that is assigned to the database and reset the password and username (by reapplying it).

You should be all set after that.
__________________
Thanks,

Denis Motova
Affiliate / Operations Manager

HostICan Answers | Become a HostICan Affiliate | Create a Support Ticket.
Reply With Quote
Reply

Tags
access denied for user, error, mysql

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrade MySQL From 4.2.2 To 5.x: Do I Dare? itwasntme Virtual Private Servers (VPS) 4 09-22-2008 10:05 AM
I want to host my wordpress site with high mysql load aadhunik Pre-Sales Questions 3 08-19-2008 10:39 PM
Chris - Importing MySQL table Smaug PHP / MySQL Assistance 3 06-18-2008 03:36 PM
MySQL my.ini Queue Virtual Private Servers (VPS) 4 04-09-2008 12:19 PM
Remote MySQL lnxcode Shared Hosting 7 09-26-2007 01:13 AM


All times are GMT -4. The time now is 03:46 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.

Copyright © 2003 - 2008 HostICan. All Rights Reserved.