11.07.2015 Views

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

PHP MySQL - Stilson.net

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

www.it-ebooks.infoCHAPTER 26 • INSTALLING AND CONFIGURING MYSQLThat said,the source installation process is indeed somewhat more complicated than installingbinaries or RPMs. For starters, you should possess at least rudimentary knowledge of how to use buildtools like GNU gcc and make, and you should have them installed on your operating system. It’s assumedthat if you’ve chosen to not heed the advice to use the binaries, you know all of this already. Therefore,just the installation instructions are provided, with no corresponding explanation:1. Create the necessary group and owner:%>groupadd mysql%>useradd –g mysql mysql2. Decompress the software to the intended directory. Using the GNU gunzip andtar programs is recommended.%>cd /usr/src%>gunzip < /usr/src/mysql-VERSION.tar.gz | tar xvf -%>cd mysql-VERSION3. Configure, make, and install <strong>MySQL</strong>. A C++ compiler and make program arerequired. Using recent versions of the GNU gcc and make programs is stronglyrecommended. Keep in mind that OTHER-CONFIGURATION-FLAGS is a placeholderfor any configuration settings that determine several important characteristicsof the <strong>MySQL</strong> server, such as installation location. It’s left to you to decidewhich flags best suit your special needs.%>./configure –prefix=/usr/local/mysql [OTHER-CONFIGURATION-FLAGS]%>make%>make install4. Copy the sample <strong>MySQL</strong> configuration (my.cnf) file into its typical location andset its ownership. The role of this configuration file is discussed in depth later,in the “The my.cnf File” section.%>cp support-files/my-medium.cnf /etc/my.cnf%>chown -R mysql .%>chgrp -R mysql .5. Install the <strong>MySQL</strong> database. mysql_install_db is a shell script that logs in tothe <strong>MySQL</strong> database server, creates all of the necessary tables, and populatesthem with initial values.%>scripts/mysql_install_db --user=mysql6. Update the installation permissions:%>chown -R root .%>chown -R mysql dataThat’s it! Proceed to the “Setting the <strong>MySQL</strong> Administrator Password” section.Installing and Configuring <strong>MySQL</strong> on WindowsOpen source products continue to make headway on the Microsoft Windows server platform, withhistorically predominant Unix-based technologies like the Apache Web server, <strong>PHP</strong>, and <strong>MySQL</strong> gaining491

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!