|
Posted by Tom on 02/13/07 18:52
On Mon, 12 Feb 2007 11:30:34 +1100, dorayme wrote...
>
>In article
><doraymeRidThis-1F3292.15220511022007@news-vip.optusnet.com.au>,
> dorayme <doraymeRidThis@optusnet.com.au> wrote:
>
>
>I have PHP installed on my Mac Tiger and it works fine. It is
>version 4.4.1
>
>In my efforts to understand and work with a database, I have now
>downloaded a mysql-standard-5.0.27-osx10.4-powerpc.pkg.
>
>To tell whether one has php installed (apart from seeing if
>includes and stuff are working, there is a simple test: run a
>phpInfoPanels.php file from the server in which the only text is:
>
><?php phpinfo() ?>
>
>My question is this: what, please, is as simple a way to tell if
>the installation of MySQL is successful?
>
>Doubtless the question reveals ignorance! But that is how it is
>and I am trying to cure it. I am not even sure of the very nature
>and logic of what I have installed. I have got as far as vaguely
>understanding that this database direction involves both
>
>(a) A database server (some sort of software that somehow stores
>and controls and serves or delivers things databasewise)
>
>and
>
>(b) A "client" program which enables one to communicate with this
>server so one can make new databases, change old ones and
>generally geek away and stay young.
>
>So I have installed the package. What now, there are no whistles
>or flags or jumping gifs when I go to a page I made that gives a
>menu of my sites on my server. For all the world this corner is
>as quiet as before I installed the package. I would appreciate a
>hint of what to do next that promises to turn on some practical
>light for me.
>
I'm guessing you may need to connect to your MySQL server directly and create
the database you want to use for access with PHP if you hadn't created one
already.
Once that's in place you can try creating a test PHP page to see if you are able
to connect to that database. Maybe...
<?php
$database="database_name";
mysql_connect("localhost", "username", "password");
echo 'Connected successfully';
mysql_select_db($database) or die( "Unable to select database");
mysql_close();
?>
Tom
--
Newsguy.com
75+ days of Binary and Text Retention!
Higher levels of article completion!
Broader coverage of newsgroups
[Back to original message]
|