Page 1 of 1

mysql security problem

PostPosted: 30. June 2006 23:49
by kjharrison
I set a password for the root user in mysql, but I can still go run mysqladmin from a comand line without having to log in using mysqladmin -u root password 'password' Also, when I run WinMysqlAdmin 1.4 there is no password listed under my.iniSetup What is there is:
[WinMySQLadmin]
Server="C:/Program Files/xampp/mysql/bin/mysqld.exe"
#user=root
#password=
I dont want to play with this, but I must be doing something wrong.

I would loginto mysqladmin via phpmyadmin, but it won't take the username and password I set for it.

Also, when I CD Collection under Demos I get this message:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in C:\Program Files\xampp\htdocs\xampp\cds.php on line 64
Could not connect to database!
Is MySQL running or did you change the password?

PostPosted: 01. July 2006 12:35
by kjharrison
Also, when I connect to mysql via a commant prompt and try to log in, I get:

C:\Program Files\xampp\mysql\bin>mysqladmin -p root
Enter password: ******
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'ODBC'@'localhost' (using password: YES)'

Before I set up a password in xampp for mysql everything worked fine, so I don't know why it suddenly won't let me in.

PostPosted: 01. July 2006 12:53
by kjharrison
one more bit of info here. In the WinMySQLAdmin 1.4 window under MyODBC it says in gray text:
Not Found
Driver 3.51 Not Found

Could this be the problem? Should I try to re-install MySQL?

PostPosted: 01. July 2006 17:00
by kjharrison
Here is what I've done thus far that seems to be getting me somewhere:
I downloaded the missign driver (mysql-connector-odbc-3.51.12-win32.zip), installed it. The environment tab under MyOBDC now says:
Not Found

Driver Version
Driver C:\WINDOWS\system32\myodbc3.dll
API Level
setup C:\WINDOWS\system32\myodbc3.dll
SQL Level

I still could not connect to mysql, nor was there any information listed in WinMySQLAdmin about the database in nay of the tabs.

Next thing, I found the my.ini file in the windows directory and renamed it my.ini.old. Then I ran WinMySQL Amdmin and was prompted to set up a user and passwprd I used root with the password I want to use. And yes, now I have information about the SQL server listed in all the tabs, although the MyODBC section looks the same. Now only that, but I can;t connect to MSQL.

After a little thought, I desided to look for a my.cnf file and found I don't have one on my computer. According to mysqladmin I'm supposed to have one. Hmmm. That's my next step. Does anyone know about this file?

I'm unsure why exactly, but this worked for me.

PostPosted: 24. July 2006 06:07
by orangedrink
In the xampp control panel stop the mysql service. Uncheck the checkbox to the left and click start again. Very weird but it did the job for me.

PostPosted: 24. July 2006 21:32
by sari42
>C:\Program Files\xampp\mysql\bin>mysqladmin -p root
i think it should be
C:\Program Files\xampp\mysql\bin>mysqladmin -uroot
??