User Tools

Site Tools


build:mysql

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
build:mysql [2005/09/10 14:48]
206.197.251.57
build:mysql [2008/07/09 07:31] (current)
24.217.108.17 CMF - the <file configfile>...</file> was not working. Changed to <code>
Line 1: Line 1:
 ====== MySQL ====== ====== MySQL ======
  
-These instructions are for MySQL 4.0 on our Debian ​3.1 (RC) system.+These instructions are for MySQL 5.0 on our Debian ​4.system.
  
 ===== Installation ===== ===== Installation =====
  
-Install ​the MySQL packages+Install MySQL along with its pre-requisites
- +<code rootshell>​ 
-  # ​apt-get install mysql-common mysql-client mysql-server +apt-get install mysql-common mysql-client mysql-server 
- +</code>
-  Reading Package Lists... Done +
-  Building Dependency Tree... Done +
-  The following extra packages will be installed:​ +
-    libdbd-mysql-perl libdbi-perl libmysqlclient12 libnet-daemon-perl libplrpc-perl +
-  Suggested packages: +
-    dbishell libcompress-zlib-perl mysql-doc +
-  The following NEW packages will be installed:​ +
-    libdbd-mysql-perl libdbi-perl libmysqlclient12 libnet-daemon-perl libplrpc-perl mysql-client mysql-common +
-    mysql-server +
-  0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded. +
-  Need to get 5209kB of archives. +
-  After unpacking 12.8MB of additional disk space will be used. +
-  Do you want to continue? [Y/n]   +
- +
-Once install starts there will be a Hints screen: +
- +
- │ Install Hints +
- +
- │ MySQL will only install if you have a NON-NUMERIC hostname that is resolvable via the /etc/hosts file. +
- │ E.g. if the "​hostname"​ command returns "​myhostname"​ then there must be a line like "​10.0.0.1 +
- │ myhostname"​. +
- │ +
- │ A new mysql user "​debian-sys-maint"​ will be created. This mysql account is used in the start/stop and +
- │ cron scripts. Don't delete. +
- │ +
- │ Please remember to set a PASSWORD for the MySQL root user! If you use a /​root/​.my.cnf,​ always write +
- │ the "​user"​ and the "​password"​ lines in there, never only the password! See +
- │ /​usr/​share/​doc/​mysql-server/​README.Debian for more information. +
-       +
- +
-Answer YES when prompted to start MySQL at boot. +
  
 +NOTE: The MySQL documentation is non-free, and not included with Debian. Use the [[http://​dev.mysql.com/​doc/​ | online documentation]] provided at MySQL'​s site.
  
 ===== Password ===== ===== Password =====
Line 47: Line 16:
 NOTE: In the following instructions,​ replace $MYSQL_ROOT with the actual password. NOTE: In the following instructions,​ replace $MYSQL_ROOT with the actual password.
  
-Set the password for MySQL root user:+Set the password for MySQL root user. (If this doesn'​t work, rename your ''​.my.cnf''​ file temporarily and try again). 
 +<code rootshell>​ 
 +export MYSQL_ROOT=$MYSQL_ROOT 
 +mysqladmin -u root password "​$MYSQL_ROOT"​ 
 +</​code>​
  
-  # /usr/bin/mysqladmin -u root password '​$MYSQL_ROOT'​+Create root's MySQL configuration file, and make sure nobody else can read it: 
 +<code rootshell>​ 
 +touch /root/.my.cnf 
 +chmod 0600 /root/.my.cnf 
 +</​code>​
  
-Create ​the MySQL configuration ​file, and make sure nobody else can read it:+Edit the ''/​root/​.my.cnf'' ​file to set the password when using various client programs: 
 +<​code>​ 
 +[mysql] 
 +user     = '​root'​ 
 +password = '​$MYSQL_ROOT'​ # THIS IS NOT THE REAL PASSWORD; DO NOT CUT AND PASTE THIS!
  
-  # touch ~/.my.cnf +[mysqladmin
-  # chmod 0600 ~/.my.cnf +user     = '​root'​ 
- +password = '​$MYSQL_ROOT' ​# THIS IS NOT THE REAL PASSWORD; DO NOT CUT AND PASTE THIS! 
-Edit the file to set the password when using various client programs: +</​code>​
- +
-  ​[mysql+
-  user     = '​root'​ +
-  password = '​$MYSQL_ROOT'​ +
-   +
-  [mysqladmin] +
-  user     = '​root'​ +
-  password = '​$MYSQL_ROOT'​+
  
  
 ===== Notes ===== ===== Notes =====
  
-I wanted to install mysql-doc package too, but it doesn'​t seem to exist in Sarge.+I wanted to install mysql-doc package too, but it doesn'​t seem to exist even in the non-free section. This appears to be due to the MySQL corporation'​s licensing.
  
 The Debian installation creates a MySQL user named "​debian-sys-maint"​. The Debian installation creates a MySQL user named "​debian-sys-maint"​.
Line 75: Line 48:
 Don't delete it. Don't delete it.
  
-See /​usr/​share/​doc/​mysql-server/​README.Debian for more information. +See ''​/​usr/​share/​doc/​mysql-server-5.0/​README.Debian.gz'' ​for more information.
  
 ===== TODO ===== ===== TODO =====
- 
-Not sure if we need to set a password on the "​debian-sys-maint"​ account, 
-or anything else like that. 
-The Debian docs don't say anything about it, so I suppose we're OK. 
  
 Could probably use some tuning and routine maintenance. Could probably use some tuning and routine maintenance.
Line 92: Line 60:
  
 Initially installed, configured, and documented by Craig Buchek, 2005-02-23. Initially installed, configured, and documented by Craig Buchek, 2005-02-23.
 +
 +Installed version 5.0 on 2007-06-08, Craig Buchek.
 +
build/mysql.1126381701.txt.gz · Last modified: 2005/11/27 02:05 (external edit)