MySQL5 install stuff
Ryan Schmidt
ryandesign at macports.org
Mon Jun 25 15:55:08 PDT 2007
On Jun 25, 2007, at 17:36, paul beard wrote:
> On 6/25/07, Ryan Schmidt wrote:
>
>> You mean, you don't see instructions advising you to run
>> mysql_install_db? Those instructions are also only printed if you use
>> the +server variant. If you do not use the +server variant of mysql5,
>> it is assumed that you merely want to use mysql to connect to a mysql
>> server already running on a different computer. If you want to run a
>> mysql server on this computer, you want +server.
>>
>> The option to start the mysql server without its privilege system is
>> --skip-grant-tables but I don't think there's any reason why you
>> would need to use that.
>
> Yes, this becomes clear later. I think I recall a thread some time
> back about the usefulness of a MySQL port without the server
> variant (seems to me if it comes with more than the client and
> admin tools, a server and it's assorted oddments should be assumed).
We recently had a discussion on whether we should have a +server
variant as we do now, have a mysql5-server port which would be
analogous to the postgresql82-server port, or whether server
functionality should be always-on. I would be happy with the latter,
but I think it was voted down. Some users said they like to install
ports to an external drive which they then take to another machine,
so having MacPorts create system users and startup items outside of /
opt would not be helpful to those users. I'm sorry, I don't have a
link to that discussion handy.
For comparison, the apache2 port has a variant +no_startupitem which
is the opposite of the mysql5 +server variant. Since I still think
it's reasonable that people would most likely want mysql5 to run as a
server, perhaps that should be the default, and we should have a
+no_startupitem variant (or a +no_server variant?) to turn it off.
James, what do you think?
> So I reinstalled with +server, got the message to install the db.
Great.
> Do you not see how this could be something other than clear? It
> seems to me the ports team could just leap ahead and create a
> bundle that installs all the components for a working php/mysql/
> apache2 system. That would make more sense than installing three
> separate ports with their attendant variants.
Portfiles are designed to install one software package, not multiple
packages. Creating a port that installs multiple packages would be
very difficult since the portfile syntax is not structured for that.
I don't know of any ports that install multiple packages, and I don't
think that's the way we want to go with this project. The MacPorts
way is for ports to depend on other ports that they require. This is
fairly normal for package managers, I think.
Unfortunately, when you do this, you get the default variants for all
those other dependencies, and that may not be what you want.
The best I can offer you is that you should install the software in
the correct order with the variants you want.
sudo port install apache2
sudo port install mysql5 +server
sudo port install php5 +mysql5 +apache2
It is up to you to run "port info apache2" and "port variants
apache2" and so forth to discover which variants you want. For
example, how are we to know that you wanted apache2 and mysql5? Maybe
you wanted mysql4, or version 1 of apache. The available ports and
variants leave this selection up to you.
Perhaps we need to add instructions like this to the MacPorts wiki,
but this would be by no means specific to the php/apache/mysql ports.
It applies equally to any port you might want to use. You need to
look at the available variants before you install and see if you
might want any of them.
> And I only did this to see if I could repro the issue I was having
> with php5 and gd. Apparently not, but this is a different machine.
More information about the macports-users
mailing list