Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MYSQL accepts any password! Why? 1

Status
Not open for further replies.

bhutz

IS-IT--Management
Jan 2, 2004
9
GB
Hello all,

I have set up mysql for a second time on my system. (don't particular remember why but...)
I set up the password in my.ini that is stored in c:/windows
and obviously this same password is visible in winmysqladmin too.

However I use this command

mysql -ubhutz -p

and when prompted for the password I enter it and get the error..

ERROR 1045: Access denied for user: 'bhutz@127.0.0.1' (using pass: YES)

but the weird thing is that it works fine for a blank password?

Any ideas? Maybe something from previous installation is messing things up?
 
r u able to connect from any other host for bhutz (other than loclahost)
u chek ur Host and User tables in 'mysql' database.
there is possibly an anonymous user entry which is there my default installation of mysql.

try the following
Code:
C:\>mysql -u root mysql
mysql>DELETE FROM user WHERE User = "" ;
mysql>FLUSH PRIVILEGES ;



[ponder]
----------------
ur feedback is a very welcome desire
 
OK, I have done that but now I can not even get into mysql mode to change the password :(

Is it possible to do this via mysqladmin?

I think I have seen this elsewhere on the net so I will continue to look but if you have the code to hand I would appreciate it if you could reply to this thread.

Cheers
 
I have managed to enter a user using the grant command.

I am now having the problem that mysql is pointing to the old data folder located in

c:>program/file/mysql/data

instead of

c:>mysql/data

I have checked my.ini located in my windows folder but this points to c:>mysql/data

any ideas what other files are telling mysqladmin to point to the wrong databases?
 
it should not happen that way. by the way do u have my.cnf and my.ini - both ?. keep only one
try force starting ur mysqld (server) as
Code:
mysqld --datadir=/mysql/data
i beleive ur my.ini is contingi this entry
Code:
[mysqld]
datadir=/mysql/data






[ponder]
----------------
ur feedback is a very welcome desire
 
I tried the above but my mysql command prompt simply froze.
Looking again I think I needed to put mysqld --datadir=<B>C:</B>/mysql/data instead

By the way I only have one my.ini and that is stored in windows
 
I think the mysql server begins on startup...would I go to 'msconfig' to stop this from occuring, so that I can manually start the server using the above prompt?
 
it should not freeze rather its hould complian that another server is running. whta is ur os and mysql version



[ponder]
----------------
ur feedback is a very welcome desire
 
Sorry tshot, it did complain about that but I used the command

NET STOP MYSQL (i had seen this somewhere else on the web)

To resolve this I copied my database folder from the data section. deleted both instance of the mysql i had on my system, used regleaner to remove entries from the registry and it seems to work once i reinstall.

i'm using ....17 i think it is (the latest one in 2004 basically)

Thanks a lot for all your time and advice though ;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top