Hey, everyone!
A few months ago I installed XAMPP, and have been doing 'PHP' tutorials on it. Now, when I tried to create a database, using this code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="generator" content="NoteTab Light" />
<title>http://www.w3schools.com/php/php_mysql_create.asp:db1.php</title>
</head>
<body>
<?php
$con=mysql_connect("localhost","root","");
if (!con){//_______________________'if'[l]
die('Could not connect: '.mysql_error());
//____________________________end 'if'[r]
if (mysql_query("CREATE DATABASE my_db",$con))
{//_______________________________second 'if'[l]
echo "Database created";
}//_________________________end second 'if'[r]
else
{//________________________'else' [l]
echo "Error creating database: ".mysql_error();
}//_____________________end 'else'[r]
mysql_close($con);
?>
</body>
</html>........................................I got a "Parse Error."
So, I put a name and password into that 'MySQL administrator' thing to see what it did...and I got a desktop "Access violation at address 1000IF7 in module 'LIBMYSQL.dll'.." alert that started multiplying like a horde of wild bunnies! I finally "stopped" the administrator by right-clicking its icon down in the Taskbar Notification area; but my computer kept crashing after that. I turned off the apache server using the 'Control Panel,' but the server kept starting up again by itself. After having to 'Power Off' my computer, I restarted it and uninstalled the whole XAMPP package, except for my personal files in the 'htdoc' folder, amist a flurry of "Access violation..." window alerts that were flying at me from every direction! I thought I was in Perl Harbor!
Next, I reinstalled XAMPP using the xampp-win32-1.7.0-installer.exe, and I got these two alerts:
--Ports 80 or 443 (SSL) already in use! Installing Apache 2.2 service failed.
--Port 3306 already in use! Installing MySQL service failed!
And, of course, now I can't open up any PHP files.
Does anyone know what changes I should make on my computer before reinstalling XAMMP again? (I uninstalled it a second time.) Please use simple, step-by-step instructions: I don't understand nipits or technical jargon, as I'm new to all of this. But, I can follow simple, step-by-step, explicit instructions. Thank you.
Sincerely,
Bennie6
P.S. If I'm able to get everything installed again, I'd be happy if I could create a database using PHP and SQL, and just avoid the automated tools. Is the code that I used above flawed in some way? Thanks for any information that you can share.
P.P.S Dear Charlie [No MySQL Admin in XAMPP (WinMySQLAdmin error generator) by charlieahern on 28. February 2009 17:32]: I feel your pain. My computer has crashed like the Stock Market every time I've tried to install new sofware over the last three years.
P.P.P.S. (if there is such an abbreviation):
Initially, I followed the advice given to 'acestu': [Winmysql Problem by acestu on 27. February 2009 16:19]. The advice was to 'Remove this: ("WinMySQLAdmin.exe"), from your startup folder.' I deleted the 'WinMySQLAdmin.exe'; but then the administrator wouldn't start at all. (Was I supposed to move it to another folder instead of deleting it?) When I reinstalled the administrator, using an 'Undo' arrow, the second wave of Window Alerts commenced.