[MacPorts] howto/MAMP modified

MacPorts noreply at macports.org
Mon May 12 15:56:46 PDT 2014


Page "howto/MAMP" was changed by egall at gwmail.gwu.edu
Diff URL: <https://trac.macports.org/wiki/howto/MAMP?action=diff&version=68>
Revision 68
Comment: start of rewrite for transition from mysql5 port to mysql51 port
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: howto/MAMP
=========================================================================
--- howto/MAMP (version: 67)
+++ howto/MAMP (version: 68)
@@ -150,65 +150,63 @@
 === Step 3: Install MySQL === #mysql
 
 If you merely want to access a MySQL server running on another computer, skip to step 4. If you want to run a MySQL server on this computer, install MySQL like this:
-
-{{{
-sudo port install mysql5-server
-}}}
-
-Set up the main database
-
+{{{
+sudo port install mysql51-server
+}}}
+mysql51-server is used in this example because it is the closest to the port that was previously used in this example, which was mysql5-server. However, there are newer versions of mysql in MacPorts that may be worth considering instead. The only reason for not using any of these newer versions in this example is because that would probably require making even more changes than the move to mysql51 required. If you are personally moving from the mysql5 port to the mysql51 port, you may want to add the `+openssl` variant, as the openssl support that had previously been available by default in the mysql5 port has been moved to a variant in the mysql51 port. Even though the mysql51-server port does not have this variant itself, if you supply the variant with your invocation of `port`, it will still get passed down to the mysql51 port, because it will be installed as a dependency. Also, mysql51 now uses the `port select` mechanism, so you will have to run one of the following to get the mysql commands in your PATH: either:
+{{{
+sudo port select mysql mysql51
+}}}
+or:
+{{{
+export PATH=$PATH:/opt/local/lib/mysql51/bin
+}}}
+Once you have done at least one of the two previous commands, you can then set up the main database like this:
 {{{
 sudo -u mysql mysql_install_db5 
-sudo chown -R mysql:mysql /opt/local/var/db/mysql5/ 
-sudo chown -R mysql:mysql /opt/local/var/run/mysql5/ 
-sudo chown -R mysql:mysql /opt/local/var/log/mysql5/ 
-}}}
-
-  ''If that doesn’t work try this:''
+sudo chown -R mysql:mysql /opt/local/var/db/mysql51/ 
+sudo chown -R mysql:mysql /opt/local/var/run/mysql51/ 
+sudo chown -R mysql:mysql /opt/local/var/log/mysql51/ 
+}}}
+
+  ''If that fails to work, then try this:''
   {{{
 sudo mysql_install_db5 
-sudo chown -R mysql:mysql /opt/local/var/db/mysql5/ 
-sudo chown -R mysql:mysql /opt/local/var/run/mysql5/
+sudo chown -R mysql:mysql /opt/local/var/db/mysql51/ 
+sudo chown -R mysql:mysql /opt/local/var/run/mysql51/
   }}}
 
 Activate your MySQL server installation so that it autostarts when you boot your machine:
-
-{{{
-sudo port load mysql5-server
-}}}
-
-and then verify that it’s running
-
+{{{
+sudo port load mysql51-server
+}}}
+
+and then verify that it is running:
 {{{
 ps -ax | grep mysql
 }}}
 
-Set the MySQL `root` password (it’s currently empty, see also the security option below):
-
+Set the MySQL `root` password (it should currently be empty, see also the security option below):
 {{{
 mysqladmin5 -u root -p password <new-password> 
 }}}
 
-where `<new-password>` is your new desired root password. You will be prompted for your existing password ("`Enter password:`"); since it’s empty, just press Return.
+where `<new-password>` is your new desired root password. You will be prompted for your existing password ("`Enter password:`"); since it is empty, just press Return.
 
 Test everything by logging in to the server.
-
 {{{
 mysql5 -u root -p
 }}}
 
-Once you’re logged in, simply exit the session
-
+Once you are logged in, simply exit the session like this:
 {{{
 mysql> exit ;
 }}}
 
-If desired, reboot your machine and then run
-
+If desired, reboot your machine and then run:
 {{{
 ps -ax | grep mysql
 }}}
-
 again to verify that the daemon is again running.
 
 
@@ -222,6 +220,7 @@
 sudo /opt/local/lib/mysql5/bin/mysql_upgrade -u root -p
 sudo /opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper restart
 }}}
+(note: these instructions might not be applicable any longer...)
 
 
 ==== Optional security configuration ==== #mysql_security
-------8<------8<------8<------8<------8<------8<------8<------8<--------

--
Page URL: <https://trac.macports.org/wiki/howto/MAMP>
MacPorts <http://www.macports.org/>
Ports system for OS X

This is an automated message. Someone added your email address to be
notified of changes on 'howto/MAMP' page.
If it was not you, please report to .


More information about the macports-changes mailing list