LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 03-09-2012, 01:24 PM   #1
kwickcut
Member
 
Registered: Nov 2004
Posts: 136

Rep: Reputation: 20
lost root password mysql


after installing ubuntu perfect server 10.04
Code:
http://www.howtoforge.com/perfect-server-ubuntu-10.04-lucid-lynx-ispconfig-3
and everything was up and running after a few small tweaks with the email and ftp server i have just run up against a lost password for mysql. everything was working just fine on Wednesday but when i went to log into phpmyadmin as root yesterday i could not gain access. for some reason the root password has changed again for the second time once on the old server and once on the new server.

when trying to log into mysql command line i used this
Code:
root@server1:~# mysql -u root -p
and this is the output
Code:
root@server1:~# mysql -u root -p
Enter password:my password used during setup 
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
root@server1:~#
so i am tried to change the root password for mysql i run this command

Code:
root@server1:~# sudo /etc/init.d/mysql stop
and this is the output of said command

Code:
root@server1:~# sudo /etc/init.d/mysql stop
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mysql stop

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) utility, e.g. stop mysql
root@server1:~#
i have searched google and have not come across an answer to this issue has anyone had this happen and how did you overcome it



kwick
 
Old 03-09-2012, 10:59 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Maybe in your set-up process MySQL was set-up to listen on a different interface?
Try specifying your actual machine-name on the command-line.
 
Old 03-10-2012, 11:04 PM   #3
kwickcut
Member
 
Registered: Nov 2004
Posts: 136

Original Poster
Rep: Reputation: 20
hhhmmm ok how would i do that? as far as i know nothing has changes all of the data bases are running ok and all of the sites are good. thanks for your reply



kwick
 
Old 03-13-2012, 03:53 AM   #4
resolv_25
Member
 
Registered: Aug 2011
Location: Croatia
Distribution: Debian 10/Ubuntu 20.04
Posts: 64

Rep: Reputation: 15
Did you create another user with a grant privileges ?
If so, try to login as this user.
You may check your users with command:
mysql> select host, user, password from mysql.user;

However, passwords are encrypted and you will not see plain text passwords.
If your another user has enough privileges run:
mysql> mysqladmin -u root password NEWPASSWORD

If you can't do it, try this:
http://www.cyberciti.biz/tips/recove...-password.html
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Lost MySQL password JavaNinja Linux - Software 3 01-28-2009 02:40 PM
Lost mysql root password on slack server iiKster Slackware 6 12-29-2008 05:30 PM
Lost of mysql root password satimis Linux - Server 6 12-06-2007 09:05 PM
mysql root password lost nazir Linux - Software 6 10-09-2007 10:18 AM
lost mysql password, can't recover slackhack Linux - Software 1 12-03-2005 05:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration