Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Aug 12, 2010 12:20 am 
Offline
Senior Newbie

Joined: Sat Apr 03, 2010 3:37 pm
Posts: 13
So I migrated hosts... but seemed to have forgotten my mysql root password.

I am running 10.04 and found this mysql link http://dev.mysql.com/doc/refman/5.1/en/resetting-permissions.html but can't seem to find the .pid file.

Are there any linode library or other resources that can help me out?


Top
   
 Post subject:
PostPosted: Thu Aug 12, 2010 12:47 am 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
You don't need to locate the pid file. Just type sudo /etc/init.d/mysql stop to stop MySQL. Skip sudo if you're root.


Top
   
 Post subject:
PostPosted: Tue Aug 17, 2010 12:25 pm 
Offline
Senior Member

Joined: Thu Apr 08, 2004 3:24 pm
Posts: 92
ICQ: 3765104
Website: http://www.unixfool.com
Yahoo Messenger: wigglit2001@yahoo.com
Location: VA
hybinet wrote:
You don't need to locate the pid file. Just type sudo /etc/init.d/mysql stop to stop MySQL. Skip sudo if you're root.


Is this what the OP is really asking for? I think he's trying to reset the password to his MySQL server.

BTW, OP, no PID usually means the service isn't running.

The quicker method would probably be the "B.5.4.1.3. Resetting the Root Password: Generic Instructions" steps (IMO).


Top
   
PostPosted: Sun Oct 24, 2010 12:08 pm 
Offline

Joined: Fri Sep 17, 2010 6:59 am
Posts: 1
In a similar case, today I was unable to login into MySQL, into ISPConfig, and even into my Linode. The solution to reset the root passwords was the following.

First, the Linode (Debian 5.0):

Linode Manager > Dashboard > Shutdown
Linode Manager > Settings & Utilities > Change a Filesystem's root Password
Linode Manager > Dashboard > Boot


After that I could login again into my Linode via SSH (PuTTY) and SFTP (WinSCP).

Then, I tried many online suggestions to also reset the MySQL root password, with no success, always getting:

Code:
ERROR 1045 (28000): Access denied for user 'root'@'localhost'


MySQL's B.5.4.1. How to Reset the Root Password seemed pretty complex, so I used another simpler solution, and it worked:

Code:
/etc/init.d/mysql 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/mysql stop
/etc/init.d/mysql start


Additionaly, I use the ISPConfig control panel, and this page was helpful for the third password I had to reset: How to reset the administrator password in ISPConfig 3. And then, to change the new password:

ISPConfig > Tools > Password and Language

Hope this helps others in similar situations.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group