开发者

Why won't my PHP script work? [closed]

开发者 https://www.devze.com 2023-02-05 03:49 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 12 years ago.

I have a script that reports the following error:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'admin'@'localhost' (using password: YES) in C:\wamp\www\bits\includes\conne开发者_JAVA百科ct.inc.php on line 10

Notice: Undefined variable: l_error in C:\wamp\www\bits\includes\connect.inc.php on line 12

Notice: Undefined variable: l_cannotconnecttodatabase in C:\wamp\www\bits\includes\connect.inc.php on line 12

Why would this be?


Mysql user or password are incorrect. You need to set them in install script to correct values


It looks like you have the wrong password. Make sure mysql is installed and that whatever you are trying to install if configured to use the password you set for mysql.


It is impossible to give you a solution based on the information you supplied, but obviously you're trying to install a system that uses mysql and therefore requires credentials to be able to connect to the database management system.

You should refer to installation manual of the system in question to see where these credentials must be specified in order for installation to proceed.

EDIT: It appears that you will need to create a database and user before you can actually specify them for the bits script. You should have administrator password from the moment you installed mysql (or ask someone who did), and you can then use phpmyadmin to administer more databases and users. Keep in mind that the database user and all user accounts for your script will most likely be completely different. MySQL user to work with the database in its entirety, whereas user accounts are used to distinguish between the people accessing your scripts.

0

精彩评论

暂无评论...
验证码 换一张
取 消