Diferencia entre revisiones de «Instalar MySQL»

De Wiki de BandaAncha.eu
Saltar a: navegación, buscar
Línea 23: Línea 23:
 
  # creamos MySQL grant tables
 
  # creamos MySQL grant tables
 
  cd /usr/local/mysql
 
  cd /usr/local/mysql
 +
 
  bin/mysql_install_db --user=mysql
 
  bin/mysql_install_db --user=mysql
 +
chown -R root .
 +
chown -R mysql var
 +
chgrp -R mysql .
 +
# configurar script de inicio en el arranque
 +
#support-files/mysql.server
 +
 +
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
 +
To do so, start the server, then issue the following commands:
 +
/usr/local/mysql/bin/mysqladmin -u root password 'new-password'
 +
/usr/local/mysql/bin/mysqladmin -u root -h levitico.vectrice.com password 'new-password'
 +
See the manual for more instructions.
 +
 +
You can start the MySQL daemon with:
 +
cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &
 +
 +
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
 +
cd sql-bench ; perl run-all-tests
 +
 +
 +
ps aux
 +
kill -9 [pid]
 +
 +
==Arrancar y parar==
 +
 +
Arrancar
 +
 +
/usr/local/mysql/bin/mysqld_safe --user=mysql &
 +
 +
Parar
 +
 +
/usr/local/mysql/bin/mysqladmin shutdown

Revisión del 14:20 6 mar 2007

Si voy a downloads de mysql.com la última versión disponible es la 5.0.27. Sin embargo en ftp.mysql.com veo que estan disponibles algunas versiones más recientes, como la 5.0.36

Pasos previos

yum install gcc-c++


groupadd mysql
useradd -g mysql mysql
wget ftp://ftp.mysql.com/pub/mysql/src/mysql-5.0.36.tar.gz
tar -zxvf mysql-5.0.36.tar.gz
cd mysql-5.0.36
CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" \
./configure \
	--prefix=/usr/local/mysql \
	--enable-assembler \
	--with-mysqld-ldflags=-all-static
make
make install
# copiamos el my.cnf por defecto
cp support-files/my-medium.cnf /etc/my.cnf
# creamos MySQL grant tables
cd /usr/local/mysql

bin/mysql_install_db --user=mysql
chown -R root .
chown -R mysql var
chgrp -R mysql .
# configurar script de inicio en el arranque
#support-files/mysql.server

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /usr/local/mysql/bin/mysqladmin -u root password 'new-password' /usr/local/mysql/bin/mysqladmin -u root -h levitico.vectrice.com password 'new-password' See the manual for more instructions.

You can start the MySQL daemon with: cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &

You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory: cd sql-bench ; perl run-all-tests


ps aux
kill -9 [pid]

Arrancar y parar

Arrancar

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

Parar

/usr/local/mysql/bin/mysqladmin shutdown