apache server good, php good, mysql server good, but...
cannot login to mysql server with the localhost,username, passwd.
(win98se)
Any idea?
Please help,'cause i'm wasting precious time...
| SitePoint Sponsor |
apache server good, php good, mysql server good, but...
cannot login to mysql server with the localhost,username, passwd.
(win98se)
Any idea?
Please help,'cause i'm wasting precious time...
you'll never be what you desire

Check you php.ini file and make sure it knows where to find the mysqld.sock file, thats one of the most common connection problems I've had. (Although I've never used any of this on a *shudder* windows system)
Depending on what version you are using there should be WinMysqlAdmin.exe that will create my.ini and it will also allow you to set a password. If you want to asign a different password just erase my.ini in Windows directory and reexecute WinMysqlAdmin.exe.
Make sure you are geting the right sintax and both apache and mysql servers are on.
mysql_connect("localhost", "user", "password");
-- | StEaLThEn |--
but i did all you've told me. i've checked the path in php.ini, both servers were working (even the databases exists), but... help, cause i'm dying
![]()
you'll never be what you desire



dunno if you realized this or not, but username and passwd are not actually valid credentials.
If you have left the default values intact, then try this command
Make sure you see mysqld or mysqld-nt when you press control-alt-delete. If you don't, then its not running.PHP Code:mysql_connect("localhost", "root","");
--There's my 1.5 cents, now where is my change!?!?





Uh.. Is MySQL running? In other words if you did not explicitly start the server you won't be able to to connect. Consult the docs for info on how to do that.
Please don't PM me with questions.
Use the forums, that is what they are here for.
lupulet chill out (breath in breath out)
Let's try to get this right.
1) Is PHP installed and working? Yes
2) Is Apache installed and working? Yes
3) Start Apache
4) Start WinMysqlAdmin
You should have both running at the same time.
5) Go to the bin directory of your Mysql.
6) Type "mysql -h localhost -u root -p" or simply "mysql"
7) if you are in the mysql prompt
i.e , mysql>
you got it
If that does not work then you have a problem.
I would suggest reinstall everything.
If you done that and are trying to access trough a webpage then the problem is with your php code. Send us and we will have a look.
hope it helps![]()
-- | StEaLThEn |--
Bookmarks