Instalar MySQL
De Wiki de BandaAncha.eu
Revisión del 15:20 6 mar 2007 de Josh (discusión | contribuciones)
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