[MacPorts] howto/MySQL modified
MacPorts
noreply at macports.org
Mon Dec 29 21:36:35 PST 2014
Page "howto/MySQL" was changed by magill at mac.com
Diff URL: <https://trac.macports.org/wiki/howto/MySQL?action=diff&version=5>
Revision 5
Comment: Add $ prefix to commands
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: howto/MySQL
=========================================================================
--- howto/MySQL (version: 4)
+++ howto/MySQL (version: 5)
@@ -11,7 +11,7 @@
If you want to run a MySQL server on this computer, install MySQL like this:
{{{
-sudo port install mysql56-server
+$ sudo port install mysql56-server
}}}
= Step 2: create a database =
@@ -22,7 +22,7 @@
I have assumed "AND" as the PATH needed to be set for me.
Does this make links in /opt/local/bin for /opt/local/lib/mysql56/bin/ files?
-sudo port select mysql mysql56
+$ sudo port select mysql mysql56
generates the output:
@@ -33,39 +33,39 @@
Also, mysql56 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 mysql56
+$ sudo port select mysql mysql56
-export PATH=$PATH:/opt/local/lib/mysql56/bin
+$ export PATH=$PATH:/opt/local/lib/mysql56/bin
}}}
Once you have done at least one of the two previous commands, set up the main database:
{{{
-sudo -u _mysql mysql_install_db
-sudo chown -R _mysql:_mysql /opt/local/var/db/mysql56/
-sudo chown -R _mysql:_mysql /opt/local/var/run/mysql56/
-sudo chown -R _mysql:_mysql /opt/local/var/log/mysql56/
+$ sudo -u _mysql mysql_install_db
+$ sudo chown -R _mysql:_mysql /opt/local/var/db/mysql56/
+$ sudo chown -R _mysql:_mysql /opt/local/var/run/mysql56/
+$ sudo chown -R _mysql:_mysql /opt/local/var/log/mysql56/
}}}
= Step 3: Activate the installation =
Activate your MySQL server installation so that it autostarts when you boot your machine:
{{{
-sudo port load mysql56-server
+$ sudo port load mysql56-server
}}}
and then verify that it is running:
{{{
-ps -ax | grep mysql
+$ ps -ax | grep mysql
}}}
= Step 4: Set the MySQL password =
Set the MySQL `root` password (it should currently be empty, see also the security option below):
{{{
-/opt/local/lib/mysql56/bin/mysqladmin -u root -p password <new-password>
+$ /opt/local/lib/mysql56/bin/mysqladmin -u root -p password <new-password>
}}}
Note: This command line form of the command will generate:
''Warning: Using a password on the command line interface can be insecure.''
Therefore it is recommended that you use the interactive form:
{{{
-/opt/local/lib/mysql56/bin/mysqladmin -u root -p password
+$ /opt/local/lib/mysql56/bin/mysqladmin -u root -p password
}}}
''Enter password:'' <press return> \\
''New password:'' <new password> \\
@@ -76,7 +76,7 @@
Test everything by logging in to the server.
{{{
-mysql -u root -p
+$ mysql -u root -p
}}}
You will be prompted:
''Enter password:''
@@ -88,12 +88,12 @@
Once you are logged in, simply exit the session like this:
{{{
-mysql> exit ;
+$ mysql> exit ;
}}}
If desired, reboot your machine and then run:
{{{
-ps -ax | grep mysql
+$ ps -ax | grep mysql
}}}
again to verify that the daemon is again running.
@@ -147,11 +147,11 @@
== Starting and stopping the MySQL server ==
=== Start ===
{{{
-sudo port load mysql-server56
+$ sudo port load mysql-server56
}}}
=== Stop ===
{{{
-sudo port unload mysql-server56
+$ sudo port unload mysql-server56
}}}
-------8<------8<------8<------8<------8<------8<------8<------8<--------
--
Page URL: <https://trac.macports.org/wiki/howto/MySQL>
MacPorts <https://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/MySQL' page.
If it was not you, please report to .
More information about the macports-changes
mailing list