Mysql5 version 5.0.86 - How to Download and Install on Mac OS X
Sunday the 22nd of November, 2009

    version 5.0.86

      View the most recent changes for the mysql5 port at: mysql5.darwinports.com/diff
      Scroll down toward the bottom of the page to get installation instructions for mysql5.
      The raw portfile for mysql5 5.0.86 is located here:
      http://mysql5.darwinports.com/dports/databases/mysql5/Portfile
      Find related portfiles with the unique DarwinPorts.com search feature.
      Check for any related Fink projects here: pdb.finkproject.org/pdb/package.php/mysql5


      The mysql5 Portfile 58119 2009-09-22 11:47:40Z ryandesign macports.org $

      PortSystem 1.0

      Name: mysql5
      conflicts mysql5-devel mysql4
      Version: 5.0.86
      set branch [join [lrange [split ${version} .] 0 1] .]
      Homepage: http://www.mysql.com/
      Category: databases
      Platform: darwin
      Maintainers: ryandesign
      license GPLv2
      distname mysql-${version}
      use_parallel_build yes

      Description: Multithreaded SQL database server

      Long Description: MySQL is an open-source, multi-threaded SQL database with a command syntax very similar to mSQL.

      Master Sites: http://mysql.mirrors.pair.com/Downloads/MySQL-${branch}/ http://mysql.he.net/Downloads/MySQL-${branch}/ http://mysql.orst.edu/Downloads/MySQL-${branch} http://mysql.oss.eznetsols.org/Downloads/MySQL-${branch}/ http://mirrors.sunsite.dk/mysql/Downloads/MySQL-${branch}/ http://sunsite.informatik.rwth-aachen.de/mysql/Downloads/MySQL-${branch}/ http://ftp.plusline.de/mysql/Downloads/MySQL-${branch}/

      Checksums: md5 c1f746bfbc8c2cb3ec1e0427a8a88c55 sha1 b26680b91187165676d75e1d42fe06c8996fd43f rmd160 1b0a0ef878004d7667995a59c884430d4711be68

      depends_lib port:zlib port:openssl

      set major_version [strsed ${version} {s/\..*$//}]
      set mysql mysql${major_version}
      set libdir ${prefix}/lib/${mysql}
      set bindir ${libdir}/bin
      set dbdir ${prefix}/var/db/${mysql}
      set sysconfdir ${prefix}/etc/${mysql}
      set mysqluser mysql

      Patch Files: patch-mysql_secure_installation.sh.diff

      post-patch {
      reinplace s% BINDIR %${bindir}%g ${worksrcpath}/scripts/mysql_secure_installation.sh
      }

      configure.args --mandir=${prefix}/share/man --infodir=${prefix}/share/info --localstatedir=${dbdir} --libdir=${libdir} --bindir=${bindir} --includedir=${prefix}/include/${mysql} --datadir=${prefix}/share/${mysql} --sysconfdir=${sysconfdir} --with-zlib-dir=${prefix} --with-openssl=${prefix} --with-extra-charsets=complex --with-federated-storage-engine --with-unix-socket-path=${prefix}/var/run/${mysql}/mysqld.sock --with-mysqld-user=${mysqluser} --without-bench --enable-thread-safe-client

      # Add readline support.
      # "--without-readline" has the peculiar meaning "do not use the bundled copy
      # of readline but use the system's (i.e. MacPorts') copy of readline"
      depends_lib-append port:readline
      configure.args-append --without-readline

      Variant: server description "Obsolete; install ${mysql}-server port instead" {
      pre-configure {
      ui_msg "The +server variant is obsolete. Please install the ${mysql}-server port instead."
      }
      }

      pre-destroot {
      xinstall -m 755 -d ${destroot}${sysconfdir}
      destroot.keepdirs-append ${destroot}${sysconfdir}
      }

      post-destroot {
      delete ${destroot}${prefix}/mysql-test

      # Fix paths in manpages and sample configuration files
      foreach manpage [glob -type f ${destroot}${prefix}/share/man/man\[1-9\]/*] {
      reinplace "s|/etc/my.cnf|${sysconfdir}/my.cnf|g" ${manpage}
      }
      foreach samp_conffile [glob -type f ${destroot}${prefix}/share/${mysql}/mysql/my-*.cnf] {
      reinplace "s|/etc/my.cnf|${sysconfdir}/my.cnf|g" ${samp_conffile}
      }

      # Symlink mysql binaries into bin directory, with ${major_version} appended to the name
      foreach f [glob -tails -directory ${destroot}${bindir} my*] {
      ln -sf ${bindir}/${f} ${destroot}${prefix}/bin/${f}${major_version}
      }
      }

      livecheck.type regex
      livecheck.url http://dev.mysql.com/doc/refman/${branch}/en/releasenotes-cs-[strsed ${branch} {s/\./-/}].html
      livecheck.regex {Changes in MySQL ([0-9.]+)}

    If you haven't already installed Darwin Ports, you can find easy instructions for doing so at the main Darwin Ports page.

    Once Darwin Ports has been installed, in a terminal window and while online, type the following and hit return:


      %  cd /opt/local/bin/portslocation/dports/mysql5
      % sudo port install mysql5
      Password:
    You will then be prompted for your root password, which you should enter. You may have to wait for a few minutes while the software is retrieved from the network and installed for you. Y ou should see something that looks similar to:

      ---> Fetching mysql5
      ---> Verifying checksum for mysql5
      ---> Extracting mysql5
      ---> Configuring mysql5
      ---> Building mysql5 with target all
      ---> Staging mysql5 into destroot
      ---> Installing mysql5
    - Make sure that you do not close the terminal window while Darwin Ports is working. Once the software has been installed, you can find further information about using mysql5 with these commands:
      %  man mysql5
      % apropos mysql5
      % which mysql5
      % locate mysql5

     Where to find more information:

    Darwin Ports



    Lightbox this page.