FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » error from phpadmin
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: error from phpadmin [message #176734 is a reply to message #176711] Fri, 20 January 2012 13:31 Go to previous messageGo to previous message
John is currently offline  John
Messages: 18
Registered: September 2010
Karma:
Junior Member
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.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Implied cast differs from explicit cast
Next Topic: HTTP headers and header()
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 16:53:56 GMT 2024

Total time taken to generate the page: 0.04028 seconds