[CENTER]:notme: Never underestimate the power of a motivated idiot!!! :notme:[/CENTER]
I managed accidentally remove both BOTH root MySQL using phpMyAdmin (You should have seen my face when it printed out the commands it sent… :/)
oh :swear:!
i tried using /usr/bin/mysqld_safe --user=root but phpmyadmin still wont let me login…
help!
Note: I am using Ubuntu, but i CAN login as root!
Addis
December 2, 2006, 10:45am
2
[CENTER]:notme: Never underestimate the power of a motivated idiot!!! :notme:[/CENTER] [center]:doh: too true:doh: [/center][ot]i’ve done some idiotic thing too, i only realize how stupid i was after the event[/ot]
Success
Thanks Addis, doubt i would have found “–init-file=temp” without that.
If anybody else manages this, then here’s how you can sort it…
create a text file called “temp” containing the following line and put it in your home folder.
GRANT ALL PRIVILEGES ON *.* TO 'bob'@'%'
Kill mysql (You will need to do this as root or with sudo)
/etc/init.d/mysql stop
start mysql with the following command, replace ‘impotence’ with the name of your home folder.
mysqld --init-file=/home/impotence/temp
congrats, you created a fully privileged user called bob (with no password) that can be logged into from anywhere!
get everything back the way it was and then delete bob!
Addis
December 5, 2006, 8:22pm
5
Glad you got it sorted :).