Installing MySQL on Linux (and nix) Systems

Installing MySQL on Linux (and *nix) Systems

First, you must download the software.

  1. Head on over to http://www.mysql.com; click the "downloads" link, and choose the latest "stable" release.

    Note 

    I prefer to get the source packages rather than the binary packages. This way, I get to see more of what is going on with the installation and feel that I have a little more control. These instructions cover installing MySQL from a source package.

  2. Download the source package, and put it into a directory where you can extract the .tar file.

  3. Extract the source files.

    tar -xzvf mysql-3.23.xx.tar.gz 
  4. As root, create the group and user for MySQL.

    groupadd mysql useradd -g mysql mysql
  5. Switch to the directory where the source files are located; this directory is created when you extract the files.

    cd mysql-3.23.49
  6. Run the configuration script.

    ./configure --prefix=/usr/local/mysql
  7. Compile the source.

    make
  8. Install the files.

    make install
  9. Install the initial databases.

    scripts/mysql_install_db
  10. Change the ownership of the MySQL files.

    chown -R root /usr/local/mysql chown -R mysql /usr/loca/mysql/var chgrp -R mysql /usr/local/mysql
  11. Copy the configuration file to the /etc directory.

    cp support-files/my-medium.cnf /etc/my.cnf
  12. Start the MySQL daemon.

    /usr/local/mysql/bin/safe_mysqld --user=mysql &

MySQL should now be up and running for you!



Perl Database Programming
Perl Database Programming
ISBN: 0764549561
EAN: 2147483647
Year: 2001
Pages: 175

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net