Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mysql password [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mystified
l33t
l33t


Joined: 14 Feb 2004
Posts: 771

PostPosted: Thu Nov 20, 2008 11:30 pm    Post subject: mysql password [solved] Reply with quote

I just finished repairing a partially hosed system but I cannot log into the mysql server because it won't recognize my user name and password. Is there anyway of getting around this and setting a new password?

Thanks


Last edited by mystified on Sat Nov 22, 2008 11:15 pm; edited 1 time in total
Back to top
View user's profile Send private message
shivernz
n00b
n00b


Joined: 12 Nov 2006
Posts: 70
Location: New Zealand

PostPosted: Fri Nov 21, 2008 12:37 am    Post subject: Reply with quote

This looks like it may do the job...

http://www.cyberciti.biz/tips/recover-mysql-root-password.html
Back to top
View user's profile Send private message
mystified
l33t
l33t


Joined: 14 Feb 2004
Posts: 771

PostPosted: Fri Nov 21, 2008 9:33 am    Post subject: Reply with quote

for some reason I can't get past step 2. It won't start mysql again. Is there a way to start over? remove the databases and start from scratch?
Back to top
View user's profile Send private message
meal
n00b
n00b


Joined: 20 Nov 2006
Posts: 65
Location: Silesia / Poland

PostPosted: Fri Nov 21, 2008 9:37 am    Post subject: Reply with quote

paste error what you get
_________________
http://www.mkozak.pl
http://blog.mkozak.pl
Back to top
View user's profile Send private message
mystified
l33t
l33t


Joined: 14 Feb 2004
Posts: 771

PostPosted: Fri Nov 21, 2008 9:38 am    Post subject: Reply with quote

It doesn't give me an error. It just hangs.
Back to top
View user's profile Send private message
meal
n00b
n00b


Joined: 20 Nov 2006
Posts: 65
Location: Silesia / Poland

PostPosted: Fri Nov 21, 2008 9:42 am    Post subject: Reply with quote

and
Code:
ps -aux | grep mysql
returns empty?
_________________
http://www.mkozak.pl
http://blog.mkozak.pl
Back to top
View user's profile Send private message
mystified
l33t
l33t


Joined: 14 Feb 2004
Posts: 771

PostPosted: Fri Nov 21, 2008 9:57 am    Post subject: Reply with quote

Code:
gentoo drivers # ps -aux | grep mysql
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
root     13424  0.0  0.2   7068  2652 pts/1    S+   03:27   0:00 mysql -u root
mysql    23254  0.0  2.2 127176 23160 ?        Ssl  03:30   0:00 /usr/sbin/mysqld --defaults-file=/etc/mysql/my.cnf --basedir=/usr --datadir=/var/lib/mysql --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock
root     24281  0.0  0.0   1812   520 pts/2    S+   03:56   0:00 grep --colour=auto mysql
Back to top
View user's profile Send private message
meal
n00b
n00b


Joined: 20 Nov 2006
Posts: 65
Location: Silesia / Poland

PostPosted: Fri Nov 21, 2008 11:01 am    Post subject: Reply with quote

So, as you can see, you've got mysql running. You need to shut down it.
Code:
/etc/init.d/mysql stop


and be sure if it's down.

then you can run mysql_safe and change root password ;)
_________________
http://www.mkozak.pl
http://blog.mkozak.pl
Back to top
View user's profile Send private message
mystified
l33t
l33t


Joined: 14 Feb 2004
Posts: 771

PostPosted: Fri Nov 21, 2008 11:17 am    Post subject: Reply with quote

I can go through all the steps and change my password but I still can't login.
Back to top
View user's profile Send private message
meal
n00b
n00b


Joined: 20 Nov 2006
Posts: 65
Location: Silesia / Poland

PostPosted: Fri Nov 21, 2008 11:57 am    Post subject: Reply with quote

And what if you specify the hostname?

Code:
mysql -h host -u user -p

_________________
http://www.mkozak.pl
http://blog.mkozak.pl
Back to top
View user's profile Send private message
mystified
l33t
l33t


Joined: 14 Feb 2004
Posts: 771

PostPosted: Fri Nov 21, 2008 12:31 pm    Post subject: Reply with quote

No, everything gives me access denied. Isn't there a way to just start over with mysql?
Back to top
View user's profile Send private message
meal
n00b
n00b


Joined: 20 Nov 2006
Posts: 65
Location: Silesia / Poland

PostPosted: Fri Nov 21, 2008 5:36 pm    Post subject: Reply with quote

delete all from /var/lib/mysql/mysql/* and run mysql_install_db
_________________
http://www.mkozak.pl
http://blog.mkozak.pl
Back to top
View user's profile Send private message
mystified
l33t
l33t


Joined: 14 Feb 2004
Posts: 771

PostPosted: Fri Nov 21, 2008 8:16 pm    Post subject: Reply with quote

Thanks!
Back to top
View user's profile Send private message
meal
n00b
n00b


Joined: 20 Nov 2006
Posts: 65
Location: Silesia / Poland

PostPosted: Sat Nov 22, 2008 7:48 pm    Post subject: Reply with quote

If my solution helped you, add solved to topic ;)
_________________
http://www.mkozak.pl
http://blog.mkozak.pl
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
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
You cannot vote in polls in this forum