Re: error from phpadmin [message #176739 is a reply to message #176734] |
Fri, 20 January 2012 15:24 |
Erwin Moller
Messages: 228 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 1/20/2012 2:31 PM, John wrote:
> Am 19.01.2012 14:17, schrieb Erwin Moller:
>
>>
>> See my answer to cerr, in this very group, just 2 days ago.
>> The thread is named "phpmyadmin config problems".
>>
>
> thanks to Erwin, André and Captain. I have tried all suggested
> variations, without success. I have even re-installed the whole XAMPP.
> There must be something odd in my code which provokes the error, and
> still couldnt find the cause.
>
> It's a simple test (I am a scratch beginner with php+MySQL) and I just
> wanted to see if I can create a database, just create it without tables.
> And then check with phpadmin if it has bee created successfully.
>
> My php code is :
>
> <?php
> require('config.php');
> $conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS)
> or die('Could not connect to MySQL database. ' . mysql_error());
>
> mysql_select_db(SQL_DB,$conn);
> $sql1 =
> "CREATE DATABASE IF NOT EXISTS normative_db";
> mysql_query($sql1) or die(mysql_error());
> ?>
>
> and config.php is as follows :
>
> <?php
> define ("SQL_HOST","localhost");
> define ("SQL_USER","root");
> define ("SQL_DB","normative_db");
> define ("SQL_PASS", "ciccio");
> ?>
>
> A rather mysterious thing happens : as soon as I run the above code,
> after that I cant access the MySQL any more.
> It comes with errors like 'connect error', telling me to check all the
> parameters, or it gives the error which I reported on my first post.
> I have tried all the variations suggested in here. Nothng helps.
>
> I have re-installed XAMPP already twice.
>
> If I dare run the code, from that moment, NOTHING seem to work any more.
>
> Out of desperation I am now trying to understand deeper the httd.conf
> from Apache and the my.ini files of MySQL.
>
> But its big waste of time and I wonder how much it will take before I
> solve the problem and if it is all worth it.
>
> But i HAVE to do my task with a database on the network, there's no way
> out.
>
> Anybody has the faintest idea of what I am doing wrong ?
>
> Is it so terrible to create a database without tables, and then check
> that everything is OK by running phpadmin ?
>
>
> Thanks again for all hints.
>
> John.
Hi John,
I strongly advise you to ask in the forum of mysql:
http://forums.mysql.com/
We are PHP folk, not mysql folk.
This is a common problem, so read up there a little first, I am sure
many people asked the same question.
Good luck.
Regards,
Erwin Moller
--
"That which can be asserted without evidence, can be dismissed without
evidence."
-- Christopher Hitchens
|
|
|