LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 05-25-2007, 10:47 PM   #1
the_Case
LQ Newbie
 
Registered: Oct 2004
Location: Oz
Distribution: debian
Posts: 10

Rep: Reputation: 0
Mysql password reset etch


Howdy.

can anyone translate this into etch for me?

http://www.linuxquestions.org/linux/...ssword_recovey

I can't seem to get safe_mysql working.

After installing mysql I used pa$$word as the password, it will not let me log on to mysql. The mysql server runs fine, I can stop and start the daemon. I can't log into it.

I've tried changing it and I just keep getting wrong password errors, no matter what I do.

I don't really want to have to reinstall etch (again).

Can anyone please help me?

 
Old 05-26-2007, 09:26 AM   #2
FMC
Member
 
Registered: May 2007
Location: São Paulo
Distribution: Gentoo & Debian
Posts: 97

Rep: Reputation: 15
If you can start and stop the server you can try to use the debian-sys-maint for something:
# cat /etc/mysql/debian.cnf

Maybe you can try mysql_fix_privilege_tables, not sure, but you can try!

[]'s, FMC!
 
Old 05-26-2007, 10:00 AM   #3
the_Case
LQ Newbie
 
Registered: Oct 2004
Location: Oz
Distribution: debian
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by FMC
If you can start and stop the server you can try to use the debian-sys-maint for something:
# cat /etc/mysql/debian.cnf

Maybe you can try mysql_fix_privilege_tables, not sure, but you can try!

[]'s, FMC!
Hey thanks but not sure what to do with above?

I managed to convert the password recovery tut to debian by myself (pat pat on the back) but still getting bugger off with your password matey ie

Code:
web:/# /etc/init.d/mysql stop
Stopping MySQL database server: mysqld.
[1]+  Done                    /etc/init.d/mysql start safe_mysqld --user=mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld/mysqld.pid --datadir=/var/lib/mysql--skip-grant-tables --skip-networking
web:/# /etc/init.d/mysql start safe_mysqld --user=mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld/mysqld.pid --datadir=/var/lib/mysql --skip-grant-tables --skip-networking &
[1] 3873
web:/# Starting MySQL database server: mysqld.
Checking for corrupt, not cleanly closed and upgrade needing tables..
web:/# mysqladmin -u root flush-privileges password "newpassword"                                                                                          mysqladmin: connect to server at 'localhost' failed
come on there must be some one out there who can give me a some clearer leads than this?

I thought this open source community was mean't to be helpful?

Every forum I have sort help from I get nothing but ideas with no direction. Not impressed!!

I can't even seem to get a straight out "you are a stupid newbie, reinstall from start and try again". At least that would be some more insightful direction than I have had.
:d
 
Old 05-26-2007, 10:06 AM   #4
the_Case
LQ Newbie
 
Registered: Oct 2004
Location: Oz
Distribution: debian
Posts: 10

Original Poster
Rep: Reputation: 0
Code:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

web:/# mysqladmin -u root flush-privileges password "newpassword"
mysqladmin: connect to server at 'localhost' failed
I just keep getting rejected, just like my love life. ;D at least there's some humour left in me.

Time for a reinvention or reinstall again I guess.

Seems sad to reinstall etch to fix mysql but I'm too stupid to find out how not to.
;d
 
Old 05-26-2007, 10:46 AM   #5
FMC
Member
 
Registered: May 2007
Location: São Paulo
Distribution: Gentoo & Debian
Posts: 97

Rep: Reputation: 15
Quote:
Originally Posted by the_Case
(using password: NO)
Try to use a password!!!!!!!!!!
 
Old 05-26-2007, 01:57 PM   #6
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 910

Rep: Reputation: 174Reputation: 174
the_Case, I just ran the /usr/bin/mysql_install_db and I'm having the same problems. The output from that command tells you to run /usr/bin/mysqladmin -u root password "password" and /usr/bin/msqladmin -u root -h host-name password "password". The first command seemed to work. The second one failed. Now I can't do anything with mysql or mysqladmin. I always get the same errors you do.

FMC, how do you specify a password? I've tried everything I can think of to supply the password I set with the /usr/bin/mysqladmin -u root password "password" command, and nothing works.

I think I'm going to try to reset the root password and start all over if I can't managed to get past this.
 
Old 05-26-2007, 02:32 PM   #7
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 910

Rep: Reputation: 174Reputation: 174
OK well I least I figured out how to enter the passsword.

mysqladmin -u root -p

then you get prompted for password.
 
Old 05-26-2007, 03:15 PM   #8
FMC
Member
 
Registered: May 2007
Location: São Paulo
Distribution: Gentoo & Debian
Posts: 97

Rep: Reputation: 15
That is it Z038, you figured out the answer!

If you need any other help just post here, but the_Case, dont tell that the community dont help you! lol

[]'s, FMC!
 
Old 05-26-2007, 09:37 PM   #9
the_Case
LQ Newbie
 
Registered: Oct 2004
Location: Oz
Distribution: debian
Posts: 10

Original Poster
Rep: Reputation: 0
Hey FMC,

thanks for you input!!! Just my impatience with my lack of knowledge, nothing to do with the community. LOL.

Z038

this is something I tried also. mysqladmin -u root -p
I just want to change my password so I can get access to mysql but it won't let me. :d

So this is my problem.
Password doesn't work. Old password, new password, resetting password. It doesn't work.
I've tried a few different methods including
killing process with cat and creating an init file with new password inside and restarting in safe mode, still to no avail.

How do I remove mysql completely and reinstall it? I really think this is the path forward for me.

I know how to apt-get remove mysql-server (which I've tried) but it doesn't remove everything because when I go to enter
new password, I get request to enter old password and then told password is incorrect.

TC
 
Old 05-27-2007, 08:57 AM   #10
FMC
Member
 
Registered: May 2007
Location: São Paulo
Distribution: Gentoo & Debian
Posts: 97

Rep: Reputation: 15
Purge is your option on apt-get:
Code:
purge  The package is selected to be purged (i.e. we want to remove everything, even  configuration files).
And have a look on /var/lib/mysql/ to be sure that databases have been removed.

[]'s, FMC!
 
Old 05-27-2007, 04:00 PM   #11
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 910

Rep: Reputation: 174Reputation: 174
the_Case, if you think you know what password you originally set, try this:
Code:
mysql -uusername -ppassword 

with no spaces between the -u and username and the -p and password
If that works, you'll be at a mysql prompt. Then you can list all the users and tables and such using the commands described in the MySQL 5.0 Reference Manual. I found section 2.4.15.3. Securing the Initial MySQL Accounts and section 5.8. MySQL User Account Management most helpful.
 
Old 05-30-2007, 04:08 AM   #12
the_Case
LQ Newbie
 
Registered: Oct 2004
Location: Oz
Distribution: debian
Posts: 10

Original Poster
Rep: Reputation: 0
etch

Hey guys thanks for all your help!!

FMC - Purge didn't work.
I'd started my reinstall of etch by the time
I've just checked your message Z038. :-/ (didn't get email notification?)

It works now, I highly recommend not using $ signs in your password for mysql.

there is no spoon until you choose there to be one.

Hopefully I can return the help someday.

anon

TC
 
  


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
mysql: still can't login after root password reset andredude Linux - Software 4 12-19-2014 06:30 PM
How to retrieve( or reset) root password in Mandrake Linux, as I forgot my password? Reghunath Linux - Software 4 05-08-2008 04:11 AM
mysql root password reset. gtum5 LinuxQuestions.org Member Intro 0 03-08-2007 08:57 PM
MySQL - Canot reset password texmansru47 Linux - Software 1 10-10-2005 05:19 PM
Password reset hongman Linux - Newbie 2 07-11-2005 05:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:29 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