Page 1 of 1

MYSQL database deactivated

PostPosted: 15. July 2010 18:58
by ckdoublenecks
I need help with my Xammplite installation. My OS system is Windows 2000 Prof.

Clicking the xampp icon in the toolbar shows both Apache and MYSQL running.
Entering "localhost" in the browser brings up the Xampp main page. Everything worked down to "Tools".

When I click on "phpMyAdmin" I get the message:
" #1045 - Access denied for user 'root'@'localhost' (using password: NO)

Checking the "Status" shows the MYSQL databases DEactivated ? I have successfully created 2 databases.

Entering http://localhost/phpmyadmin/index.php takes me to my password page -
username "root" (which I hope to learn how to change to something else) and my password.

My phptest.php doesn't work. The code is below:

<html>
<head><title>php test</title>
</head><body>
<p><? php echo "anybody home?"; ?>
</p>
</body></html>

Re: MYSQL database deactivated

PostPosted: 21. July 2010 23:00
by mattston
to reset password for database, go to xampp admin page, go to security page and follow directions. I had the same database problem, go to xampp\htdocs\xampp and find mysql.php and enter your password.
<?php
if (@mysql_connect("localhost", "root", "password here")) {
echo "OK";
} else {
echo "NOK";
}
?>
this worked for me.

Re: MYSQL database deactivated

PostPosted: 22. July 2010 02:06
by ckdoublenecks
That problem has been resolved. I cleared everything, downloaded Xampp but I changed the download directory to c:\ck. Everything seems to be running. The console shows Apache and MYSQL running. Status shows all activated, Security shows all secure. I go thru passord always. My databases are established and are at c:\xampp\mysql . My website homepage is at c:\ck\xampp\htdocs\hofiles\homain.html. My phptest.php is at the same place as my web files but if I replace the aforementioned "homain.html" with "phptest.php" the below source code is displayed:
======================================================================
<html>
<head><title>php test</title>
</head><body>
<p><? php echo "anybody home?"; ?>
</p>
</body></html>
=========================================================================
I was expecting to see: anybody home?

I'm thinking that the directory for my databases isn't right for my files to access? I have been wrestling with this for weeks, have programs written to display the databases but first the PHP has to work?

Re: MYSQL database deactivated

PostPosted: 22. July 2010 10:00
by Nobbie
There seems to be a .htaccess file in c:\ck\xampp\htdocs\hofiles which changes the MIME Type of PHP files (AddType ...). Check that out.