Deploying Mysql

From WTFwiki
Revision as of 16:51, 20 August 2006 by Jontow (talk | contribs) (add mysql deployment tutorial)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Requirements/Assumptions

  • This documentation is for FreeBSD using the Ports Collection.
  • You should have an up-to-date (recently cvsup'd) ports tree.

Building From Source

  • Change into the port directory of relevance:
 # cd /usr/ports/databases/mysql50-server
 # make install
  • Do NOT do a "make install clean" here, explicitly using "make install", see the next steps.
  • Once that finishes (it will take a while.. it has to build client & server, and they're large.) it is time to configure it.
 # echo 'mysql_enable="YES"' >>/etc/rc.conf
  • Do NOT typo that line. It'll be bad, honest.
 # /usr/local/etc/rc.d/mysql-server start
 # cd work/mysql-5.0.24/scripts/
 # sh mysql_secure_installation.sh
  • Answer all questions honestly (enter because root pass is null, then SET ONE!)
  • Say 'Y' to remove anonymous users
  • Say 'Y' to disallow root login remotely
  • Say 'Y' to remove test database and all access to it
  • Finally, Say 'Y' to reload the privilege tables.
 # cd ../../.. ; make clean
  • From here, you are roughly done. To get to the CLI, do this:
 # mysql -u root -p
  • (Enter password.. read manual.)