screwed up mysql settings
Greetings.
I am trying to get my head round mysql. I found a grat tuorial on the internet but accidentally messed up one of the commands and now cannot get into mysql as root. I need to scrub the settings I have entered thus far and start from scratch again. Can anyone tell me where the file is with the passwords/user settings in please? |
Re: screwed up mysql settings
Quote:
Have you simply tried to su to root on your machine and just running mysql, without specifying the password? su - <password> mysql mysql> Should throw you right into the tables where you can update the password there. |
here's what I'm experiencing;
su <password> mysql ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO) mysqladmin -u root password xxxxx mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user: 'root@localhost' (Using password: NO)' (as root) mysql -p xxxx mysql> however, I cannot enter the "mysqladmin blah" command from within mysql hence wanting to know where the appropriate settings are kept so I can start from the beginning again with ALL settings apologies if I haven't understood something fundamental here like I said, trying to get the old head round mysql, started yesterday afternoon, screwed it up within 5 minutes doh! |
I don't really know, but I would guess that removing the user.* and maybe db.* from
Code:
/var/lib/mysql/mysql (Move the files instead of deleting them. Just in case). |
Logging into mysql
logging in is a pain to mysql. Heres what i always have to include (it only works for me as root)
mysql -u root -h 192.168.1.1 -p <asks for password> if i specify -h localhost or -h actual.host.name or -h my.ip or exclude the -h it will not work. not sure as to why. hope that helps a little. |
will have a play
have just managed to get knoda working, this allows for creation and manipulation of databases and also managed to get a database created using openoffice seriously steep learning curve! (bearing in mind I've used access about three times and that is my total exeperience with databases) thanks for the advice/help |
All times are GMT -5. The time now is 09:12 PM. |