I have installed php5 and mysql5 on my server , I can login to mysql from command,
but when I try to connect using php I got this error message:
Access denied for user ‘root’@’localhost’ (using password: YES)PHP Warning: mysql_query() [function.mysql-query]: Access denied for user ‘ODBC’@’localhost’ (using password: NO) in D:\HostingSpaces\law-training\lawtraining.ir\wwwroot\includes\class.php on line 279 PHP Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in
I dont use ‘ODBC’@’localhost’ in my code at all.
I check using phpmyadmin , also I can’t use it and can’t connect to server.I use port 3309 for mysql , and from local or remote php can’t login.
I use also mysql4 on this server on port 3306 and I can use it without problem.
how can i fix this problem?
Thanks
Try logging in to
localhost:3309, I think you’ll find that you’re running it on a non-standard port, so you need to tell PHP where to look for the server.ie.
As a sidenote, the
ODBC@localhostconnection is whatmysql_querytries to use if there’s no connection already open.