MySQL is not connecting

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
mkolias
Posts: 5
Joined: 10 Jul 2008, 18:55

MySQL is not connecting

Post by mkolias »

Hello everyone,

I am knew to Mantis so if I have a hard time explaining something please let me know. I amtrying to setup Mantis 1.2 with PHP 5.26 and MySQL 5.0.45

I have gotten the PHP and Mantis installed but when I try to connect to MySQL it is unable to connect. I am not sure what I am missing.

When I go to http://localhost/mantis/index.php I get:

APPLICATION ERROR #400
Database connection failed. Error received from database was #1045: Access denied for user 'mantisdbuser'@'localhost' (using password: NO)

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.


Previous non-fatal errors occurred. Page contents follow.

SYSTEM WARNING: mysql_connect() [function.mysql-connect]: Access denied for user 'mantisdbuser'@'localhost' (using password: NO)


When I try and run a simple php script:

<html>
<head><title>PHP and SQL Integration Test</title></head>
<body>

<?php
$link = mysql_connect("localhost", "", "") or die("Could not connect");
print "Connected successfully";

$query = "SELECT now()";
$result = mysql_query($query)
or die("Query failed");

print "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
print "\t<tr>\n";
foreach ($line as $col_value) {
print "\t\t<td>$col_value</td>\n";
}
print "\t</tr>\n";
}
print "</table>\n";

mysql_close($link);
?>

</body>
</html>


I get an error that reads:Could Not Connect


Please Help!! I have been looking at this for 2 days and my head is about to explode.
mkolias
Posts: 5
Joined: 10 Jul 2008, 18:55

Re: MySQL is not connecting

Post by mkolias »

Found out what my issue was. I needed to go in and adjust my config_inc.php file to have all of the appropriate username and password information.

I click on the admin/check.php and everything is now in the green.
Post Reply