> I want to find out if and where the MySQL is installed on my OS X
> Tiger G4.
If I'm not mistaken Tiger doesn't ship with a pre-installed MySQL, but
you can check whether and where it is installed:
$ sudo find / -name "mysql"
If it's not installed, get it here:
<http://dev.mysql.com/downloads/mysql/4.1.html#macosx-dmg> and follow
the install instructions at
<http://dev.mysql.com/doc/refman/4.1/en/mac-os-x-installation.html>.
--
Sander Tekelenburg, <http://www.euronet.nl/~tekelenb/>
Mac user: "Macs only have 40 viruses, tops!"
PC user: "SEE! Not even the virus writers support Macs!"
You might find MAMP useful:
http://www.mamp.info/en/mamp.html
Makes running an Apache server with MySQL and PHP very, very simple.
--
Jonny
(replace invalid with co dot uk)
One of your links gives help:
'Due to a bug in the Mac OS X package installer, you may see this
error message in the destination disk selection dialog:
You cannot install this software on this disk. (null)
If this error occurs, simply click the Go Back button once to return
to the previous screen. Then click Continue to advance to the
destination disk selection again, and you should be able to choose the
destination disk correctly. We have reported this bug to Apple and it
is investigating this problem.
But does not install no matter how many times I go back and forth: I
get the same message.
> On Jul 20, 10:30 pm, Sander Tekelenburg <u...@domain.invalid> wrote:
[... <http://dev.mysql.com/doc/refman/4.1/en/mac-os-x-installation.html>]
> 'Due to a bug in the Mac OS X package installer, you may see this
> error message in the destination disk selection dialog:
>
> You cannot install this software on this disk. (null)
> [...] But does not install no matter how many times I go back and forth: I
> get the same message.
That's of course only a bug when you get that error without a good
reason :) Doesn't mean you might not be getting that error for a *good*
reason. For instance, if the installer sees that MySQL already is
installed. Some other valid reasons the installer might fail would
probably be: a damaged file system, incorrect permissions, or you're
trying to install the wrong MySQL version for your system
(<http://dev.mysql.com/doc/refman/4.1/en/mac-os-x-installation.html>
lists 3 different packages for 10.4.x -- make sure to pick the right one
for your machine).
For what purpose are you running a web server?
Web development prior to transfer to a public server?
Running a public web server from your Mac?
Providing MySQL databases or other web applications on your computer or
local network?
Other?
Lest this run off-topic, MAMP-specific queries may be better directed to
their forum:
http://forum.webedition.de/phpBB/viewforum.php?f=13
Exactly which link would be suitable for a Powermac running 10.4.11
that is successfully running the server that comes with OS X but is
not running or finding MySQL. Which specific link would you recommend?
Yes
> Running a public web server from your Mac?
>
No
[...]
> Exactly which link would be suitable for a Powermac running 10.4.11
> that is successfully running the server that comes with OS X but is
> not running or finding MySQL. Which specific link would you recommend?
Depends on what you mean with "Powermac". Some are 32-bit, some are
64-bit. But since earlier you also said "G4", which afaik are all
32-bit, I'd say you need the "Mac OS X 10.4 (PowerPC, 32-bit)"
("Standard") package:
<http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-standard-4.1.22-apple
-darwin8.6.0-powerpc.dmg/from/pick>.
Then I think you'll like MAMP. As it's a self-contained Apache/MySQL/PHP
web server (using port 8888 by default) the Mac's built-in server can
either be switched off or left running without causing confusion.
MAMP includes MySQL 5.0.41.
Yes, that is the one I got first time. I have no idea why it won't
install, the only message being "There is nothing to install". I have
previously sought a way to find if it is installed already but have
not been able to follow through any algorithm to find out
definitively? Would appreciate help.
My question about this particular route remains. Is the server that
comes with OS X (which runs beautifully but which I would of course
turn off if I was trying to install the MAMP package) simply stay
there as a program and all associated files in my system etc but be
unused or does the MAMP package somehow see it and update it and clean
it and I get a replaced working server with MySQL. Sorry if this
sounds like there are wrong assumptions or unnecessary worries but I
am flying in the dark. Plus ages ago I got MAMP and basically got
lost! I am determined to have another go!
(Damn! Why can't I copy and paste the name or anything from the .dmg
file name or from Get Info, why is this blocked? I will type it:)
mysql-standard-5.0.27-os10.4-powerpc.pkg
and
MySQLStartupitem.pkg
And this time, both installed. But let me be accurate: the installer
said or acted as if they installed.
I can verify the MySQL.prefPane because this showed up in System
Preferences and I said yes, start the MySQL server and it said it
had!
Beyond this I have no idea? Once I get the hang of making a table
(about which i have no idea yet) that somehow is active via php on a
web page, I am sure I will be happy and away. But so far this is the
stage I have reached. I think I have made progress.
What in simple terms should I now do to practically verify the
mysequel server is running? Can some one please point me to what I
should insert as a test in a web page source to test? Or is this too
naive question?
> My question about this particular route remains. Is the server that
> comes with OS X (which runs beautifully but which I would of course
> turn off if I was trying to install the MAMP package) simply stay
> there as a program and all associated files in my system etc but be
> unused or does the MAMP package somehow see it and update it and clean
> it and I get a replaced working server with MySQL. Sorry if this
> sounds like there are wrong assumptions or unnecessary worries but I
> am flying in the dark. Plus ages ago I got MAMP and basically got
> lost! I am determined to have another go!
To quote the MAMP site:
'...MAMP will not compromise any existing Apache installation already
running with your OS X.'
I ran both MAMP and the built-in server together for a time without any
problem, though I was not using MySQL with the latter. Others may be
able to give you the additional assurances you require so I recommend
making any further queries on the MAMP Forum.
Good luck.
Thank you for your kind attention. (I might duck over to MAMP soon.
But, as I have some indication that I have mySQL after latest
download, I might see if there is a way to proceed from what I have
already got).
If you don't, you make it unnecessarily hard for people to figure out
what you mean, thus discrouraging them from offering help. So it's in
your own interest.
In article
<b30f6ca6-b616-4f96...@h17g2000prg.googlegroups.com>,
Patricia Aldoraz <patricia...@gmail.com> wrote:
[... after installing MySQL]
> What in simple terms should I now do to practically verify the
> mysequel server is running?
Make use of /Applications/Utilities/Activity Monitor. See if it lists
"mysqld" as a running process. (Or on the cli do something like $ ps
-auxww | grep mysqld | grep -v grep)
Also note <http://dev.mysql.com/doc/refman/4.1/en/post-installation.html>
Most importantly, set the root passwords, as per
<http://dev.mysql.com/doc/refman/4.1/en/default-privileges.html> (ignore
the Windows sections -- the unix stuff applies to Mac OS X). If you
don't, any local user can do anything with your mysql server.
> Can some one please point me to what I
> should insert as a test in a web page source to test?
That would be a nonsensical way to merely test whether mysqld is
running. You'd be, needlessly, introducing lots of potential points of
failure. Lesson 1 in debugging is to discard everything that is not
strictly relevant.
Once you've passpharse-protected the root accounts, the easiest to test
the set-up further is probably to simply use a mysqldump from your
production server. See if that works as expected.
Btw, in case you don't know about it, you might like CocoaMySQL:
<http://cocoamysql.sourceforge.net/>. It has some bugs, but is the most
'Mac-like' GUI MySQL client I've found.
It does not list it.
> (Or on the cli do something like $ ps
> -auxww | grep mysqld | grep -v grep)
>
You have lost me? cli?
> Also note <http://dev.mysql.com/doc/refman/4.1/en/post-installation.html>
>
Good, thanks for drawing my attention to this. Is there any technical
reason beyond security why I have to have a password? If I do not set
a password, will everything work just as well for me? If I make a
password, can I use the same password as my user account on my Mac
(what I use to log in at start up)?
> Most importantly, set the root passwords, as per
> <http://dev.mysql.com/doc/refman/4.1/en/default-privileges.html> (ignore
> the Windows sections -- the unix stuff applies to Mac OS X). If you
> don't, any local user can do anything with your mysql server.
>
> > Can some one please point me to what I
> > should insert as a test in a web page source to test?
>
> That would be a nonsensical way ...
>
> Once you've passpharse-protected the root accounts, the easiest to test
> the set-up further is probably to simply use a mysqldump from your
> production server. See if that works as expected.
>
mysqldump? Perhaps his newsgroup is only for folk up to a certain
speed? Perhaps it must be as frustrating to you as to me. Except I am
the loser in this, not you. :)
> Btw, in case you don't know about it, you might like CocoaMySQL:
> <http://cocoamysql.sourceforge.net/>. It has some bugs, but is the most
> 'Mac-like' GUI MySQL client I've found.
>
Thank you for this link. I am just looking at it now and will download
one of the three:
Latest Binary: CocoaMySQL v0.5
Latest Binary BETA (recommended): CocoaMySQL v0.7b5 (BETA)
Current Source: CocoaMySQL source v0.7b4 (BETA)
That word 'recommended' is like a shiny trinket to my eyes. Perhaps
that is the one I should get?
Maybe the word "recommended" is attractive --
but the word "BETA" would scare the dickens out of me!
That generally means they expect you to help them find the bugs.
:-)
> In article
> <41019f9b-9675-49ac...@a3g2000prm.googlegroups.com>,
> Patricia Aldoraz <patricia...@gmail.com> wrote:
>
> > I want to find out if and where the MySQL is installed on my OS X
> > Tiger G4.
>
> If I'm not mistaken Tiger doesn't ship with a pre-installed MySQL, but
> you can check whether and where it is installed:
>
> $ sudo find / -name "mysql"
>
> If it's not installed, get it here:
> <http://dev.mysql.com/downloads/mysql/4.1.html#macosx-dmg> and follow
> the install instructions at
> <http://dev.mysql.com/doc/refman/4.1/en/mac-os-x-installation.html>.
Neither Tiger nor Leopard comes with mysql installed.
I was able to install and run this with the pre-installed apache and
pre-installed PHP, but it took some work and familiarity with:
1) OS X Terminal application
2) simple unix commands such as sudo, ls, cd, chmod, grep
3) ability to use vi or other editor to edit configuration files
4) understanding of unix permissions
To the OP: Patricia, when I did the install, I made some notes about
what I did post-install, which I can post here. Nothing particularly
hard, but it does require knowledge of (1) thru (4) above. The
post-install actions mean that you can take the following html and have
it output something interesting:
<html>
<head>
</head>
<body>
<p>This is my test page</p>
<?php phpinfo (); ?>
</body>
</html>
I'll look for my notes tonight.
Right. The following notes are what I did. You may not need (3) under
Apache, and the system prefs item for mysql may work better now than it
did for me when I made these notes, meaning (2) under mysql is not
needed, you can start/stop it from system prefs. Also it may be that you
don't need to use chmod in (3( and (4) of mysql to be able to edit the
file - perhaps it can be done with sudo.
Most of the following requires use of Terminal.
Things needed to make apache/mysql/PHP5 play together
=====================================================
Apache
------
1) De-comment the php5 include in main config file in
/private/etc/apache2/httpd.conf
2) Accept .phtml as suffix in: /private/etc/apache2/other/php5.conf
AddType application/x-httpd-php .phtml
3) add a user-specific config file in
/private/etc/apache2/users/name.conf
<Directory /Users/name/Sites>
AllowOverride None
Order deny,allow
Allow from all
</Directory>
4) Documents will be served from /Library/WebServer/Documents
mysql
-----
1) When installing the startupitem, ensure it really gets installed and
do it again if necessary. See (2)
2) Start and stop the server from /Library/StartupItems/MySQLCOM. To do
this, run the script there as:
./MySQLCOM start
./MySQLCOM stop
3) Make a /etc/my.cnf from /usr/local/mysql/support-files/my-huge.cnf
Use chmod o+w my.cnf to make it editable
Add a section at the end [mysqld] with max_allowed_packet = 16M
Add this also to the [mysql] section
Undo the first thing with chmod o-w my.cnf
Restart mysql
4) Make a /etc/php.ini from /etc/php.ini.default
Use chmod o+w php.ini to make it editable
Find the line: mysql.default_socket =
Change it to be: mysql.default_socket = /tmp/mysql.sock
Undo the first thing with chmod o-w php.ini
Restart personal websharing
> > Neither Tiger nor Leopard comes with mysql installed.
>
> > I was able to install and run this with the pre-installed apache and
> > pre-installed PHP, but it took some work and familiarity with:
>
> > 1) OS X Terminal application
> > 2) simple unix commands such as sudo, ls, cd, chmod, grep
> > 3) ability to use vi or other editor to edit configuration files
> > 4) understanding of unix permissions
>
oh oh!
> > To the OP: Patricia, when I did the install, I made some notes about
> > what I did post-install, which I can post here. Nothing particularly
> > hard, but it does require knowledge of (1) thru (4) above. The
> > post-install actions mean that you can take the following html and have
> > it output something interesting:
>
...
> > <?php phpinfo (); ?>
That is no problem at all, that just gets me the info panal on my php
and I have PHP Version 4.4.7 ok, it runs fine and so does my server.
All that part is hunky dory. I just want to get to first base in
understanding this MySQL business. I want to install it (and I think I
have?). I have a panel in my sys prefs at the bottom that has "Start
MySQL Server" and Stop uit, I pressed it after following as many of
the gent Sander's directions as possible (I was like a monkey doing
its best on a typewriter).
This panel says it is running in hopeful green text. I need o know
what is the very next step I should take. I don't suppose someone
would tell me just one step and give me a criterion for if it is
successful and no more and I will come back and ask for the next
step. (Tim, you say decomment something in PHP 5. Well I have not go
PHP 5. I have what seems quite perfect to my needs as mentioned above.
Must I have it? If I must, I will get it.
(I do appreciate all your notes Tim and habve filed them on my
maachine)
If your test web page shows a nicely formatted screen in your web
browser with information about what is/is not enabled in your PHP setup,
then that's good - a good step. You have PHP 4.4.7, that will be fine to
get you going. It also means that the section of my instructions for
apache is completed or not needed.
(I didn't follow this thread from the beginning, are you running Tiger?
The notes I posted were for Leopard and PHP5. You don't absolutely
*need* PHP5, when/if you eventually go to Leopard you'll get it anyway.)
It also sounds like you have mysql running fine. I would also install
the GUI mysql administrator program from their web site, because you
will need to use it to create a test username/password in mysql, that
you can use from within PHP to connect to the database (without it
you'll need to use Terminal to do that). There's also another GUI
program you can use to execute commands in mysql, such as CREATE
DATABASE (again, avoids needing to do it from the command line).
In the admin program once you have a username/pw, you need to assign it
privs to access the database in question, and a host to access it from.
If you're doing everything on the same machine then that's localhost.
> In article <tim.streater-3E71...@news.individual.net>,
> Tim Streater <tim.st...@dante.org.uk> wrote:
[snip]
> > In the admin program once you have a username/pw, you need to assign it
> > privs to access the database in question, and a host to access it from.
> > If you're doing everything on the same machine then that's localhost.
>
> I think the basic problem here is that the OP was told they needed MySQL
> for some reason or other. Perhaps this person's technical level isn't
> up to using a database manager where you have to program it from square
> one.
>
> Let's start from scratch. What are you trying to accomplish here? You
> posted with a technical question on how to install and setup MySQL.
> What are you going to use it for? Typically, there are programs that
> use it as data repository (e.g. web-based sites like blogging software
> or web forums or a wiki). Even though they're web-based, they run only
> on your local machine, mostly due to ISPs restricting servers on their
> networks. If you want others to access it on the web, you need to have
> the software setup on a web-hosting service rather than on your local
> system.
>
> Again, what are you trying to accomplish there? Why do you need to run
> MySQL?
Pertinent question. In fact my next ones were going to be along the
lines of:
1) What's your programming level?
2) Do you know how to write PHP to read/write info from/to a database
and generate HTML based on the info read/written.
OP is unfamiliar with unix/cli but that needn't necessarily be a
show-stopper, if she is OK with the programming aspects.
> It also sounds like you have mysql running fine.
I have no way of knowing except that text I mentioned that said "The
MySQL Database Server is *running*" where running is in green. This is
a panel I downloaded and installed in Sys Prefs.
I also know there is a mysql user from other programs that others have
suggested. When I came to set these up in NetInfo manager, I ran into
trouble (I caused a mysterious user called Other User to appear on my
Login screen when I start the computer!). Anyway, never mind that,
perhaps someone can assist me in just one step to do with this NetInfo
Manager: In a panel, in the second column, there is a list of words
among which are "groups" and "users". Under users there is a fourth
column showing the incredible number and mysteriously named users (my
my, what has populated my machine now? <g>). I understand that the
user mysql (it has a 19 before "mysql") is important. So I pressed it
and the panel underneath showed a lot of details faded. I clicked the
lock, entered my user name (the one I use to login to my G4) and I
then entered a password (the same as my user login. IUs that ok. (I
did not even want a password - I don't really care at all about
security for the moment, but I have no way of knowing if it is a
technical requirement). I then clicked the lock. With "groups" I did
nothing and did not set a password for now. Must I? (Please, no need
to say why it is very important unless it is crucial for sheer
operation).
OK, then I opened up MySQL Tools. MySQL Administrator.app and MySQL
Query Browser.app are in there, along with a widget that never seems
to launch. Lts concentrate on the former app. And open the Connection
Editor. How is one to fill this in? Is there any guideline? Do I just
make up a Connection name? What is user? Is it me, Patricia Aldoraz or
the mysterious "msql"? The password was an easy decision because i
made it the same for both me and the mysterious user mysql. What am I
supposed to put for host name?port? Schema? Whatever I have tried has
not resulted in being able to "make a connection".
[I cannot believe that a database, a sort of spreadsheet should have a
whole religion surrounding it like this! Why is it a server rather
than a file sitting on the computer. I mean, for Gods sake! I use php
and CSV files to generate html tables and it is dead simple. The lowly
csv file is just a text file and does a multi national enterprise to
support it! <g>]
> Let's start from scratch. What are you trying to accomplish here? You
> posted with a technical question on how to install and setup MySQL.
> What are you going to use it for? Typically, there are programs that
> use it as data repository (e.g. web-based sites like blogging software
> or web forums or a wiki). Even though they're web-based, they run only
> on your local machine, mostly due to ISPs restricting servers on their
> networks. If you want others to access it on the web, you need to have
> the software setup on a web-hosting service rather than on your local
> system.
>
> Again, what are you trying to accomplish there? Why do you need to run
> MySQL?
>
Good questions all. I want to learn how to generate HTML content from
databases. Simple stuff. I want to be able to do it on my machine
first via my own server to understand a few things about it.
Eventually i will be wanting to do this via external commercial
servers (they have help for their servers on this but I am not there
yet). I just want to understand a bit about this business on my
machine and to set up the simplest possible database or table. I have
no idea at all why it is so incredibly complicated?
Perhaps I should try to make a simple spreadsheet of my own and php to
link to it and avoid this incredible Boeing 747 mySQL? I know that one
can generate an HTML table from a simple text file (CSV) that sits on
my server, and that a bit of php in the HTML doc and the presence of
such a file on the server is the only things needed. No multi national
company, no Boeing 747 manual or rabbit warren or dangerous mazes to
run. But I jest a bit, I do know that much must have gone into this
MySQL business to make it really useful. I just want to understand it
a bit and get to first base.
> DeeDee, don't press that button! DeeDee! NO! Dee...
> [I filter all Goggle Groups posts, so any reply may be automatically by ignored]
> On Jul 31, 10:25 pm, Tim Streater <tim.strea...@dante.org.uk> wrote:
> > (I didn't follow this thread from the beginning, are you running Tiger?
> > The notes I posted were for Leopard and PHP5. You don't absolutely
> > *need* PHP5, when/if you eventually go to Leopard you'll get it anyway.)
> >
> Tiger 10.4.11
>
> > It also sounds like you have mysql running fine.
>
> I have no way of knowing except that text I mentioned that said "The
> MySQL Database Server is *running*" where running is in green. This is
> a panel I downloaded and installed in Sys Prefs.
Then it's running.
> I also know there is a mysql user from other programs that others have
> suggested. When I came to set these up in NetInfo manager, I ran into
> trouble (I caused a mysterious user called Other User to appear on my
> Login screen when I start the computer!). Anyway, never mind that,
> perhaps someone can assist me in just one step to do with this NetInfo
> Manager: In a panel, in the second column, there is a list of words
> among which are "groups" and "users". Under users there is a fourth
> column showing the incredible number and mysteriously named users (my
> my, what has populated my machine now? <g>). I understand that the
> user mysql (it has a 19 before "mysql") is important. So I pressed it
> and the panel underneath showed a lot of details faded. I clicked the
> lock, entered my user name (the one I use to login to my G4) and I
> then entered a password (the same as my user login. IUs that ok. (I
> did not even want a password - I don't really care at all about
> security for the moment, but I have no way of knowing if it is a
> technical requirement). I then clicked the lock. With "groups" I did
> nothing and did not set a password for now. Must I? (Please, no need
> to say why it is very important unless it is crucial for sheer
> operation).
You set up mysql users in mysql, not somewhere else. Netinfo manager is
not relevant.
> OK, then I opened up MySQL Tools. MySQL Administrator.app and MySQL
> Query Browser.app are in there, along with a widget that never seems
> to launch. Lts concentrate on the former app. And open the Connection
> Editor. How is one to fill this in? Is there any guideline? Do I just
> make up a Connection name? What is user? Is it me, Patricia Aldoraz or
> the mysterious "msql"? The password was an easy decision because i
> made it the same for both me and the mysterious user mysql. What am I
> supposed to put for host name?port? Schema? Whatever I have tried has
> not resulted in being able to "make a connection".
As I recall, when you first start the admin program, with a fresh mysql
install, there is one user set up (root) with no password. Because your
mysql server is on your computer, the host is localhost.
> [I cannot believe that a database, a sort of spreadsheet should have a
> whole religion surrounding it like this! Why is it a server rather
> than a file sitting on the computer. I mean, for Gods sake! I use php
> and CSV files to generate html tables and it is dead simple. The lowly
> csv file is just a text file and does a multi national enterprise to
> support it! <g>]
Now, now. Calm down. A spreadsheet could be viewed as a primitive
database. You could I suppose export it to a csv file and read that from
the PHP. That's just one table, then isn't it! OK, so you do that with
lots of them. Then you are going to have to write enough PHP to be able
to parse the csv file(s), and write them back out again. And what do you
do when the user clicks that button on your web page, and this requires
that you delete row 27 from your csv file? And how are you going to do
complex searches over several of these tables at once?
By the time you've solved all this, you have some of the functionality
of a proper database. May as well have used mysql in the first place.
You're going to need, also, to know enough SQL to be able to make
queries of the database so you can get information out of it and put
information into it.
[...]
> I also know there is a mysql user from other programs that others have
> suggested. When I came to set these up in NetInfo manager, I ran into
> trouble (I caused a mysterious user called Other User to appear on my
> Login screen when I start the computer!). Anyway, never mind that,
> perhaps someone can assist me in just one step to do with this NetInfo
> Manager:
NetInfo is Mac (pre-Leopard) specific, so you should ask about it in
<news:comp.sys.mac.system>, not in a general mysql group. In any case,
you needn't have messed with it. By default NetInfo is configured just
fine for mysql.
[...]
> OK, then I opened up MySQL Tools. MySQL Administrator.app and MySQL
> Query Browser.app are in there, along with a widget that never seems
> to launch. Lts concentrate on the former app. And open the Connection
> Editor. How is one to fill this in? Is there any guideline? Do I just
> make up a Connection name?
I don't use these tools, but I'm guessing it's asking about which mysql
server to connect to. In other words, the server's domain name or IP
adddress.
[Remember, MySQL is a server/client thing. You have now (hopefully
succesfully :)) installed the MySQL server (aka "mysqld"). Now to do
anything with it, you need to connect to it with a client. Somewhat
comparable to web servers and browsers.]
Since you're running the MySQL server on the same machine that you are
connecting from (the client), you would enter "localhost" as the address
to connect to. (In some Mac OS X situations "localhost" may not work (an
IPV6 issue), in which case you should instead try "127.0.0.1".)
The username to enter is "root", because after initial MySQL
installation, that is the one and only mysql user that exists. After
initial installation, no password is set for that user, so you enter an
'empty' password (leave the password field empty).
(In your setup, you shouldn't need to enter anything else (like port
numbers) to get a sucessful connection.)
However, as I said before, you should really set a password on the root
user. The root user is allowed to do anything. So even someone who is
very experienced with mysql could with a single silly mistake mess up
the entire mysql server. People make mistakes, so that's bound to happen.
The concept of "multiple users" exists to protect from attacks, but also
to protect yourself from potentially disastrous results of your own
mistakes. So set a password on that root user! From then on, only use
the root user when you absolutely have to (to avoid messing things up
like you seem to have done with NetInfo). Then create a new user, with
fewer rights -- no more than you need -- and use that user for your
daily stuff. See
<http://dev.mysql.com/doc/refman/4.1/en/user-account-management.html>
> What is user? Is it me, Patricia Aldoraz or
> the mysterious "msql"?
Neither. Both the user named "Patricia Aldoraz" and the user named
"mysql" are users known to your *operating system*. But MySQL itself
internally also uses this "multiple users" concept. Those are "mysql
users" and exist only within the MySQL server.
[...]
> [I cannot believe that a database, a sort of spreadsheet should have a
> whole religion surrounding it like this! Why is it a server rather
> than a file sitting on the computer.
A spreadsheet can only do what a spreadsheet can do. When you need more,
you get something else that can do the more that you need.
Both a bicycle and a car can get you from Amsterdam to Rome. The bicycle
is cheaper, easier to learn to ride and to learn to maintain. The car
gets you there a lot faster. Religion or other fairy tales have nothing
to do with it.
> On Jul 28, 10:42 pm, Sander Tekelenburg <u...@domain.invalid> wrote:
> > [... after installing MySQL]
> >
> > > What in simple terms should I now do to practically verify the
> > > mysequel server is running?
> >
> > Make use of /Applications/Utilities/Activity Monitor. See if it lists
> > "mysqld" as a running process.
>
> It does not list it.
Then your MySQL server is not running, regardless of your MySQL prefpane
claiming different.
However, do make sure you've bothered to understand how
/Applications/Utilities/Activity Monitor works -- I suspect you're
fooling yourself. Make sure that in Activity Monitor
[1] the CPU tab is active
[2] upper right, the menu says "All processes" (I believe it lists only
user processes by default)
[3] in the filter field at the top, type "mysqld", so that only that
will be listed.
If "mysqld" still is not listed, it is not running.
> > (Or on the cli do something like $ ps
> > -auxww | grep mysqld | grep -v grep)
>
> You have lost me? cli?
Sorry "command line interface". So, in the case of Mac OS X, the stuff
you get with /Applications/Utilities/Terminal
[A good place to look up acronyms is <http://www.acronymfinder.com/>.]
So what I meant was: launch Terminal, and enter "ps -auxww | grep mysqld
| grep -v grep" (without the quotes), then hit the Enter key. The result
should look something like this:
root 206 0.0 0.0 27812 32 ?? S Fri11AM 0:00.03
/bin/sh ./bin/mysqld_safe --datadir=/usr/local/mysql/data
--pid-file=/usr/local/mysql/data/YourMacsName.local.pid
mysql 225 0.0 0.2 63520 1628 ?? S Fri11AM 1:22.27
/usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql
--datadir=/usr/local/mysql/data --user=mysql
--pid-file=/usr/local/mysql/data/YourMacsName.local.pid
You don't need to do this. I just mentioned this as one method, not
knowing that you might not know any cli stuff. If you feel uncomfortable
at the cli, you can just use Activity Monitor to see if mysqld is
running.
> > Also note <http://dev.mysql.com/doc/refman/4.1/en/post-installation.html>
>
> Good, thanks for drawing my attention to this. Is there any technical
> reason beyond security why I have to have a password?
The fact that you are, I assume, human and will therefore make mistakes.
Especially at your current level.
> If I do not set
> a password, will everything work just as well for me?
Yes, until you make a mistake. After a mistake, given your current
level, you will have a hard time explaining what you did, so you'll have
a hard time getting help to fix the mistake.
Make your life easier, and set a password on the root mysql user, never
use that user unless you absolutely need it, and create 1 or more othr
users that are allowed only to do what you need them to be allowed to do.
There's nothing wrong with living dangerously. It's just that you will
have to be prepared to save your own ass then.
> If I make a
> password, can I use the same password as my user account on my Mac
> (what I use to log in at start up)?
You can, but I would advise against it. Here's what I do:
- set a strong passphrase on the rot mysql user and only ever login as
root when I absolutely need to (like for creating the first other user)
- create an admin user that can only do what I need to administer the
MySQL server
- For web sites, create a user that can only read, not write, and only
read the database and tables it needs to read
- When the web site needs to write, create another user that is granted
write access to only those databases/tables that it absolutely needs to
No doubt more experienced MySQL developers will have better ideas. But I
think the basic idea is sound: always use users that are allowed to do
no more than they need to. That way, if an attacker succeeds, or when
you make a mistake, the damage will be much less than when you do
everything as root.
[...]
> > Once you've passpharse-protected the root accounts, the easiest to test
> > the set-up further is probably to simply use a mysqldump from your
> > production server. See if that works as expected.
>
> mysqldump? Perhaps his newsgroup is only for folk up to a certain
> speed?
This group is for humans. No one can read your mind; know in advance
exactly what you do or do not yet know. It's not practical to assume you
know nothing; to explain *everything* just in case you might not know
something. So people will assume you know certain things. Just ask when
you don't understand something.
mysqldump is a program to write an entire database to a file. It's
useful to create backups, and to export things from one database and
import them in another.
I thought you were saying you are already using MySQL on a production
server, and just wanted to run MySQL locally on your development Mac.
That's why I suggested you use mysqldump to export a database from your
development server, import it in your newly installed MySQL server on
your Mac, and use it just like you do on the development server.
But perhaps there is no development server yet? In that case you can
safely ignore this mysqldump stuff for now :)
> Perhaps it must be as frustrating to you as to me. Except I am
> the loser in this, not you. :)
No frustration and no losers. It only gets frustrating when people do
not ask questions because they're afraid to, or when they don't bother
to read other sources they are referred to.
[... <http://cocoamysql.sourceforge.net/>]
> Latest Binary: CocoaMySQL v0.5
> Latest Binary BETA (recommended): CocoaMySQL v0.7b5 (BETA)
> Current Source: CocoaMySQL source v0.7b4 (BETA)
>
> That word 'recommended' is like a shiny trinket to my eyes. Perhaps
> that is the one I should get?
Yes. It works quite well. The only bugs I'm aware of is that
[1] sometimes it loses an established connection to a MySQL server --
just quit it and launch it again
[2] entering text blobs doesn't always work reliably -- by the time you
get annoyed with that problem you can start using other ways to enter
such data
Since my being unable to see it listed before, I have done my best to
follow much advice given here and it is *now* listing in Activity
Monitor. It takes up 13.64MB of RAM and 62 of VM. I can now turn it on
and off with the Sys Pref facility that shows "Running" in green or
"Stopped" in red.
So something is right. But I so appreciate your taking the time with
all your remarks, I want to just touch base and let you know. I will
write about the issues facing me soon.