The Cache: Technology Expert's Forum
Welcome, Guest. Please login or register. September 16, 2019, 09:12:00 PM

Login with username, password and session length

Pages: [1]
Author Topic: Installing MySQL from Source  (Read 2237 times)
Olde World Hacker
Offline Offline

Posts: 10096

View Profile
« on: February 26, 2008, 12:09:36 AM »

I do this all the time, yet I'm always scampering around looking for my quick instructions, so here is the quick version for posterity.

Download the source for MySQL from here:

The that comes down will create it's own directory, so go where you want your install directory (typically /usr/local/installs) and tar -xzvf mysql-VERSION

CD into the newly created directory, then:
     shell> groupadd mysql
     shell> useradd -g mysql mysql
     shell> ./configure --prefix=/usr/local/mysql
     shell> make
     shell> make install
     shell> cp support-files/my-medium.cnf /etc/my.cnf
     shell> cd /usr/local/mysql
     shell> bin/mysql_install_db --user=mysql
     shell> chown -R root  .
     shell> chown -R mysql var
     shell> chgrp -R mysql .
     shell> bin/mysqld_safe --user=mysql &    <<< Dont forget the ampersand

A default install has no password attached to the root user, so you'll want to:

     shell> bin/mysqladmin -u root password NEWPASSWORD

An excellent second step, assuming this is a LAMP rig, is to go get the phpMyAdmin source here:

unpack it into a directory, point Apache at it with something as simple as:
   ServerName   42.phpMyAdmin
   DocumentRoot   /www/sites/phpMyAdmin

you'll also need to put a configuration file into the root directory of phpMyAdmin, that looks like this (

$cfg['Servers'][$i]['user']          = 'username';
$cfg['Servers'][$i]['password']      = 'password';

Restart Apache and you should be good to go (assumes you have PHP running already as well...)

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
Pages: [1]
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks

Valid XHTML 1.0! Valid CSS!