Re: MySQL and Mac OSX



In article
<1171471338.635781.120390@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
"kenoli" <kenoli.p@xxxxxxxxx> wrote:

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.

Thanks for this. I have BBEdit and yes, MySQL is there.


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/


Looking at the file system that was opened by BBEdit, it goes:

dorayme's Power Mac G4/usr/local/mysql/

and there are all sorts of things from there. The mysql folder is
an alias as I can see by the little curved arrow in the icon. So,
given this info, what exactly am I to type into Terminal please?

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 actually do have this as part of a package I downloaded called
MAMP. I had though MAMP would be an easier route to things when I
got a bit lost after previously installing MySql. But for now, I
prefer to do without MAMP. I can download the the open source
software phpmyadmin afresh or borrow it from the MAMP package.


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.


Any recommendations by anyone would be appreciated. The simpler
the better at first.

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.

You are undoubtedly right. I think that at least with me, a few
confidence building measures helps, like getting various
ill-understood things to actually work or "do as expected". Much
appreciate your remarks throughout here...

--Kenoli

On Feb 13, 4:39 pm, dorayme <doraymeRidT...@xxxxxxxxxxxxxxx> wrote:
In article <eqt1dh0...@xxxxxxxxxxxxxxx>, Tom <t...@xxxxxx> wrote:
On Mon, 12 Feb 2007 11:30:34 +1100, dorayme wrote...

In article
<doraymeRidThis-1F3292.15220511022...@xxxxxxxxxxxxxxxxxxxxxxxx>,
dorayme <doraymeRidT...@xxxxxxxxxxxxxxx> 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

--
dorayme
.



Relevant Pages

  • Re: PHP front to mySQL database
    ... You should be able to set up MySQL to respond via ODBC to calls from VB. ... Set up the database file table structure in Access and call it from VB. ... I also prefer to use the web browser as the client interface instead of VB. ... an installation pain. ...
    (alt.php)
  • Re: Newbie- Can I create a new MySQL database from within my app?
    ... MySQL has similar schema backup and restore options. ... scripts sort out the registry and install the software and this has worked ... your installation routines should handle database installation setup etc. ...
    (alt.comp.lang.borland-delphi)
  • Re: MySQL data
    ... the /usr/local/mysql folder. ... to the databases themselves is in the data folder below mysql - do you ... screwing up my installation if I overwrite new database engine files ... The two versions of the database have to have ...
    (uk.comp.sys.mac)
  • Re: DBD::mysql failing to make test
    ... I decided that, as a backup strategy for learning MySQL, I ... MySQL server installation. ... How to Protect or Change the MySQL Unix Socket File ... DBD::mysql installation would ultimately have succeeded without them. ...
    (perl.dbi.users)
  • Re: Starting Mysql service.. Problem
    ... the problem was the permissions on Mysql folder... ... transmission by mistake and delete this communication from your system. ... Le présent courriel contient des renseignements de nature ...
    (Debian-User)