|
Posted by kenoli on 02/14/07 16:42
One simple way to check is to download and install the free software
TextWrangler. You can then select from the file menu "Open hidden"
and browse through the hidden directories on you MacIntosh. You
should find mysql installed in the following location:
/usr/local/
in its own subdirectory. This is also where php is installed.
To test the installation, try logging in from the "terminal" program
by entering the following command at the command line prompt:
mysql -h localhost -u root
(you may need to change directory or provide a bath to the mysql
program, which is also usually at:
/usr/local/mysql/bin/
on a MacIntosh -- the "mysql" in the path is the unix equivalent of an
"alias" in MacIntosh terminology that links to the mysql directory,
which is usually set up by the mysql installation. The "bin" is the
mysql sub-directory where mysql programs are kept.)
When mysql is installed, it installs a user named "root" that is
allowed full access in with no password. If this gets you into the
software you have an installation of mysql. You will know this as the
prompt will change to something like:
mysql:
The next thing you will need to do is to protect your installation by
adding a password to root and establishing any other users you need.
I would suggest that you do this by immediately downloading and
installing the open source software phpmyadmin. It will allow you to
set up mysql tables, change and add users, etc. through a
straightforward interface you can access via your browser.
I would also suggest that you find a good tutorial on mysql and read
the phpmyadmin documentation. The best way to use mysql is to
understand how it works. These are both easy to find on the internet.
I went through a learning curve, trying to get someone to explain
things to me and never really got it until I dug into the
documentation and understood it for myself. Until then, you will just
be following directions, forever vulnerable to things happening that
you don't understand and constant frustration.
--Kenoli
On Feb 13, 4:39 pm, dorayme <doraymeRidT...@optusnet.com.au> wrote:
> In article <eqt1dh0...@drn.newsguy.com>, Tom <t...@to.com> wrote:
> > On Mon, 12 Feb 2007 11:30:34 +1100, dorayme wrote...
>
> > >In article
> > ><doraymeRidThis-1F3292.15220511022...@news-vip.optusnet.com.au>,
> > > dorayme <doraymeRidT...@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
>
> I would like to do this. My question (not quite grammatically put
> above) was: "what, please, is a simple a way to tell if the
> installation of MySQL is successful?
>
> > 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...
>
> Thanks for below... but I have not got to that stage.
>
>
>
> > <?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
>
> --
> dorayme
[Back to original message]
|