#1  
Old 7th August 2006, 18:45
CJMostert CJMostert is offline
Junior Member
 
Join Date: Aug 2006
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default MySQL Server password reset.

Hallo
I have tried EVERY THING!!! I followed the setup:http://www.howtoforge.com/perfect_se...dora_core_5_p4 but thought to provide a secure pass for my MYSQL SERVERand forgot that Linux uses special chrs (last did linux 7 years ago) so I messed it up. However only realised it when i tried to install ISPCongfig.

I tried to follow the guid on resetting mysql from:http://dev.mysql.com/doc/refman/5.0/...rmissions.html but when I do step 4: mysqld_safe --init-file=~/mysql-init & It seems nothing happens... Ok some stuff do happen but I do not get my command prompt back!?

I even tried uninstalling and re installing MYSQL but it seems to remember the SQL password.

Please help!
Reply With Quote
Sponsored Links
  #2  
Old 7th August 2006, 18:50
CJMostert CJMostert is offline
Junior Member
 
Join Date: Aug 2006
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default More info

O btw this is what my terminal show after the "mysqld_safe --init-file=~/mysql-init &" command:

Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysqld/mysqld.pid
060807 17:47:50 mysqld ended


But then the terminal cursos just sit and blink on a blank line and nothing happens.

Thanx
Reply With Quote
  #3  
Old 8th August 2006, 01:41
themachine themachine is offline
Senior Member
 
Join Date: Oct 2005
Location: Texas, USA
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,

I am not sure which distro you are using, but the following should work:

add 'skip-grant-tables' to the MySQL server's 'my.cnf' usually found at '/etc/my.cnf. Needs to go under the '[mysqld]' section. Similar to:

Code:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
skip-grant-tables

Then restart MySQL:

Code:
/etc/init.d/mysql restart

You should then be able to login to mysql without a password:

Code:
linuxbox /]# mysql
mysql>

Now flush privileges (This clears privileges back to where they should be without 'skip-grant-tables')

Code:
mysql> FLUSH PRIVILEGES;

Then reset the root user's password:

Code:
mysql> SET PASSWORD FOR 'root'@'localhost'=PASSWORD('password');

Where 'password' is the cleartext password you want to set for root@localhost


Now remove 'skip-grant-tables' from '/etc/my.cnf' and you are all set.
__________________
themachine
5dollarwhitebox.org
Reply With Quote
  #4  
Old 8th August 2006, 18:28
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Also have a look here: http://www.howtoforge.com/forums/sho...p-grant-tables
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 14th August 2006, 21:12
CJMostert CJMostert is offline
Junior Member
 
Join Date: Aug 2006
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default Reinstallinf Fedora 5

Hallo all
It was much quicker to reinstall the Fedora 5... I did it in 3 or so hours thanx in any case
Reply With Quote
Reply

Bookmarks

Thread Tools
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 Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
php Apps email not going through palkat General 8 21st September 2011 05:35
Statistic not working mzo Installation/Configuration 49 20th April 2011 12:19
Can't set up root password on MySQL server for Ubuntu 6.06 simianstyle Installation/Configuration 15 19th June 2006 16:44
How to install BFD (Brute Force Detection) domino Tips/Tricks/Mods 9 31st March 2006 22:40
The Perfect Setup Suse 9.3 - Postfix problems new_bee05 HOWTO-Related Questions 20 25th November 2005 02:30


All times are GMT +2. The time now is 18:40.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.