LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   screwed up mysql settings (https://www.linuxquestions.org/questions/linux-software-2/screwed-up-mysql-settings-179709/)

salparadise 05-09-2004 04:05 PM

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?

trickykid 05-09-2004 05:43 PM

Re: screwed up mysql settings
 
Quote:

Originally posted by salparadise
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?

The username and password are stored within the db or tables, etc.

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.

salparadise 05-10-2004 02:44 AM

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!

esben 05-10-2004 06:47 AM

I don't really know, but I would guess that removing the user.* and maybe db.* from
Code:

/var/lib/mysql/mysql
or wherever your mysql datadir is (look in the configuration file).
(Move the files instead of deleting them. Just in case).

j33px0r 05-11-2004 10:17 AM

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.

salparadise 05-11-2004 10:35 AM

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.