简体   繁体   中英

I want connect.php file should be run in local host. But as follow error there

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'test'@'localhost' (using password: YES) in D:\\xampp\\htdocs\\ngp\\connect.php on line 2

Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'ODBC'@'localhost' (using password: NO) in D:\\xampp\\htdocs\\ngp\\connect.php on line 4

Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in D:\\xampp\\htdocs\\ngp\\connect.php on line 4

这意味着您的连接文件中的用户名/密码错误,或者您尝试连接的计算机不允许访问服务器。

This is telling you that the user test and the password you used were not valid and the user ODBC using no password was invalid. Either because they are just wrong or because the users are not allowed to connect from the machine you are connecting from. Eg if you are connecting remotely from your local machine to a hosted machine.

Check the MySql usernames and passwords you have set up to connect to your database.

Also, show some code!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM