LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Mysql password reset etch (https://www.linuxquestions.org/questions/debian-26/mysql-password-reset-etch-556770/)

the_Case 05-25-2007 10:47 PM

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?

:D

FMC 05-26-2007 09:26 AM

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!

the_Case 05-26-2007 10:00 AM

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

the_Case 05-26-2007 10:06 AM

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

FMC 05-26-2007 10:46 AM

Quote:

Originally Posted by the_Case
(using password: NO)

Try to use a password!!!!!!!!!!

Z038 05-26-2007 01:57 PM

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.

Z038 05-26-2007 02:32 PM

OK well I least I figured out how to enter the passsword.

mysqladmin -u root -p

then you get prompted for password.

FMC 05-26-2007 03:15 PM

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!

the_Case 05-26-2007 09:37 PM

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
:D

FMC 05-27-2007 08:57 AM

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!

Z038 05-27-2007 04:00 PM

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.

the_Case 05-30-2007 04:08 AM

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, :D 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


All times are GMT -5. The time now is 04:16 PM.