Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 3 Instalación de Web Server en FreeBSD 6,0 con Apache 2,2, 5,0 MySQL y PHP 5 - Parte 3
Installing Apache 2.2, MySQL 5 and PHP 5 in FreeBSD 6.0 for a Reliable Web Server Instalación de 2,2 Apache, MySQL 5 y PHP 5 en FreeBSD 6,0 para hacer una Web Server
Part 3 - Installing MySQL Server 5 with FreeBSD Ports Collection Parte 3 - Instalación de MySQL Server 5 con FreeBSD Ports Collection
- Login to the FreeBSD system as root, or su - root to get to super user environment. Acceso al sistema FreeBSD como root, o su - a raíz llegar al super usuario medio ambiente.
- Enter the following commands at FreeBSD command line interface (CLI) (Wait till each command to finish processing before running the next command): Introduce los siguientes comandos en FreeBSD interfaz de línea de comandos (CLI) (Espere hasta que cada comando para terminar la tramitación antes de ejecutar el siguiente comando):
cd /usr/ports/databases/mysql50-server CD / usr/ports/databases/mysql50-server
make install clean make install limpio
mysql_install_db --user=mysql mysql_install_db - user = MySQL
chown -R mysql /var/db/mysql/ chown-R mysql / var / db / mysql /
chgrp -R mysql /var/db/mysql/ chgrp-R mysql / var / db / mysql /
/usr/local/bin/mysqld_safe -user=mysql & / usr / local / bin / mysqld_safe-user = mysql &Note: If you encounter Command not found error, use command rehash to update OS path environment variables. Nota: Si se encuentra con Command not found error, utilice comando rehash para actualizar OS camino variables de entorno.
- The port installation will put a script file mysql-server.sh in /usr/local/etc/rc.d which will has capability to start MySQL server. El puerto de instalación se ponga un archivo de secuencia de comandos mysql-server.sh en / usr / local / etc / rc.d, que tiene capacidad para iniciar el servidor MySQL. To enable MySQL server to start automatically after every FreeBSD server reboot, enter the following command in CLI: Para activar el servidor de MySQL para que se inicie automáticamente después de cada reinicio del servidor FreeBSD, introduzca el siguiente comando en CLI:
echo ‘mysql_enable=”YES”‘ >> /etc/ rc.conf echo 'mysql_enable = "YES"'>> / etc / rc.conf
- By default, MySQL default super user account - root - has no password (blank password). De forma predeterminada, por defecto de MySQL super cuenta de usuario - raíz - no tiene contraseña (password en blanco). So it’s important to assign the administrator account password. Por lo tanto, es importante asignar la contraseña de la cuenta de administrador. To change the password to root user, enter the following command: Para cambiar la contraseña al usuario root, escriba el siguiente comando:
mysqladmin -u root password newpassword mysqladmin-u root password newpassword
Replace newpassword with your own desired password. Sustituir newpassword con su propia contraseña que desee.
- Optionally, copy either my-huge.cnf, my-large.cnf, my-medim.cnf, my-small.cnf or my-innodb-heavy-4G.cnf (depending on the usage and utilization of MySQL server) as my.cnf to /var/db/mysql which will enable you to tweak and change the configuration of server-specific MySQL server options by editing the file. Opcionalmente, copia bien mi-huge.cnf, my-large.cnf, mi-medim.cnf, my-small.cnf o mi-innodb-pesado-4G.cnf (dependiendo del uso y utilización de servidor MySQL) como mi . CNF a / var / db / mysql que le permitirá modificar y cambiar la configuración del servidor específico de servidor MySQL opciones de editar el archivo.
- MySQL 5.0 installation done. MySQL 5,0 instalación realizada.
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. IMPORTANTE: Se trata de una máquina que traduzca la página se proporciona "tal cual" sin garantía. Machine translation may be difficult to understand. La traducción automática puede resultar difícil de entender. Please refer to Por favor, consulte original English article artículo original Inglés whenever possible. siempre que sea posible.
Share and contribute or get technical support and help at Compartir y contribuir o recibir apoyo técnico y ayudar a My Digital Life Forums Mi vida digital Foros .
Related Articles Artículos relacionados
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 4 Instalación de Web Server en FreeBSD 6,0 con Apache 2,2, 5,0 MySQL y PHP 5 - Parte 4
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 5 Instalación de Web Server en FreeBSD 6,0 con Apache 2,2, 5,0 MySQL y PHP 5 - Parte 5
- Easily Set Up Web Server with XAMPP Fácil de configurar tu servidor con XAMPP
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 1 Instalar Web Server en Windows XP con Apache 2, PHP5 y MySQL4 - Parte 1
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 3 Instalar Web Server en Windows XP con Apache 2, PHP5 y MySQL4 - Parte 3
- Using phpMyAdmin for Effective MySQL Management in Windows XP El uso de phpMyAdmin para una eficaz gestión de MySQL en Windows XP
- FreeBSD Apache HTTP Accept Filter Error FreeBSD Apache HTTP aceptar filtro de error
- PHP 5 Unable to Open HTTP Request Stream with fopen or fsockopen Functions PHP 5 No se puede abrir la solicitud HTTP Stream con fopen o fsockopen Funciones
- Enable Logging of Slow Queries (Slow Query Log) in MySQL Database Habilitar registro de consultas Baja (Baja Query Log) en la base de datos MySQL
- Enable MySQL InnoDB Storage Engine Support in XAMPP Installation Activar MySQL motor de almacenamiento InnoDB apoyo a la instalación de XAMPP

































May 21st, 2006 13:12 21 de Mayo de 2006 13:12
mysql_enable = mysql_enable =
May 21st, 2006 14:07 21 de Mayo de 2006 14:07
Thanks for pointing out, will update. Gracias por haber señalado, se actualizará.
June 6th, 2006 11:08 6 de Junio del 2006 11:08
i’m stucked with the mysql part of your howto, after issuing # mysqladmin -u root password newpassword, i issued # mysql -u root -p newpassword, i always get the access denied error. Estoy stucked con el mysql parte de su guía, después de la expedición # mysqladmin-u root password newpassword, expedido i # mysql-u root-p newpassword, i siempre obtener el error de acceso denegado. what did i miss? ¿Qué se pierda?
thanks gracias
June 6th, 2006 11:49 6 de Junio del 2006 11:49
jan, may be you have set the password for root. Enero, puede ser que haya configurado la contraseña de root. Try to access mysql with -u userid and -p password option. Trate de acceso con mysql-u-usuario y contraseña-p opción. Or you can follow instruction O bien, puede seguir la instrucción here aquí on how to change and reset your root password. sobre cómo cambiar y restablecer su contraseña de root.
June 6th, 2006 14:32 6 de Junio del 2006 14:32
i’ve tried all the options mentioned but none of them worked, so i did a fresh install again, before creating a password for mysql root user, i logged in as root and it worked fine, i was able to get a mysql shell but when i issue the command mysqladmin to create a password for root, i got an error, i tried to log in as root and wtf i’m back with the same problem. He intentado todas las opciones mencionadas, pero ninguno de ellos trabajaron, por lo que hice una nueva instalación de nuevo, antes de crear una contraseña para el usuario root mysql, i conectado como raíz y ha funcionado muy bien, tuve la oportunidad de obtener un shell, pero mysql i cuando el comando mysqladmin para crear una contraseña para root, tuve un error, he intentado acceder al sistema como root y wtf Ya estoy de vuelta con el mismo problema. do u think i would be better off if i install phpmyadmin and change the root password from there? hacer pensar u i sería mejor si i instalar phpmyadmin y cambiar la contraseña de root desde allí?
June 6th, 2006 16:56 6 de Junio del 2006 16:56
Did you flush privileges after changing the password? ¿Te ha rubor privilegios después de cambiar la contraseña? The problem may be due to hashing of MySQL password. El problema puede deberse a hash de la contraseña de MySQL. May be you can try the following commands after resetting your root password if it cannot works: Puede ser puede probar con los siguientes comandos después de restablecer su contraseña de root si no funciona:
mysql -u root mysql mysql-u root MySQL
> UPDATE user SET password=password(’secret’) WHERE user=’root’; > UPDATE usuarios SET password = password ( 'secreto') WHERE user = 'root';
> flush privileges; > Flush privilegios;
You may try phpmyadmin too, but I remembered I used to have exactly this same problem while phpMyAdmin didn’t help much. Puede intentar phpmyadmin, pero me acordé yo solía tener exactamente el mismo problema, mientras que phpMyAdmin no ayudó mucho. Do let me know how you solve it. ¿Quisiera saber cómo resolverlo.
June 7th, 2006 13:14 7 de Junio de 2006 13:14
you’re right changing it via phpmyadmin gave me the same result, so what i did was change some settings in the config.inc.php of phpmyadmin, change the auth_type = cookie and blowfish = mypassphrase and everything were fine. derecho que está cambiando a través de phpmyadmin me dio el mismo resultado, por lo que lo que hice fue cambiar algunos ajustes en el config.inc.php de phpmyadmin, cambiar el auth_type = "cookie" y mypassphrase = pez globo y todo lo que se multa.
August 18th, 2006 00:57 18 de Agosto de 2006 00:57
The problem is that mysql (version 5.x) is not starting with mysql_enable=”YES” in /etc/rc.conf. El problema es que mysql (versión 5.x) es que no empiezan con mysql_enable = "YES" en / etc / rc.conf.
Im using FreeBSD v6.1.x. Im usando FreeBSD v6.1.x. I do not have the space problem between enable and the “=”. No tengo el problema de espacio y permitir que entre los "=". The message I receive on bootup is “YES: notfound”. El mensaje que recibo en el arranque es "SI: notfound".
Any suggestions welcome. Cualquier sugerencia bienvenida.
August 19th, 2006 10:45 19 de agosto de 2006 10:45
Ive followed this guide but when i run “mysql-server.sh start” it returns starting mysql and does nothing else. He seguido esta guía, pero cuando ejecuto "mysql-server.sh start" vuelve a partir mysql y no hace nada más. i ran “mysql-server.sh status” and it returned “mysql is not running” i corrió "mysql-server.sh estado" y regresó "mysql no está funcionando"
mysql_enable=”YES” is in rc.conf but is not starting. mysql_enable = "YES" está en rc.conf, pero es que no empiezan. any help? algún tipo de ayuda?
August 19th, 2006 11:25 19 de agosto de 2006 11:25
Check if you can run mysqladmin or other mysql tools. Compruebe si puede ejecutar mysqladmin mysql u otros instrumentos. Also make sure your “YES” in rc.conf is using proper “, as the ” in the article has been changed. También asegúrate de que tus "SÍ" en rc.conf usando es correcto ", como" en el artículo se ha cambiado.
August 19th, 2006 15:10 19 de agosto de 2006 15:10
rc.conf contains rc.conf contiene
mysql_enable=”YES” mysql_enable = "YES"
apache22_enable=”YES” apache22_enable = "YES"
here is results from mysqladmin -user admin aquí es el resultado de mysqladmin-usuario admin
mysqladmin: connect to server at ‘localhost’ failed mysqladmin: conectar con el servidor en 'localhost' no
error: ‘Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)’ error: "No es posible conectarse al servidor MySQL local a través de socket '/ tmp / mysql.sock' (2)"
Check that mysqld is running and that the socket: ‘/tmp/mysql.sock’ exists! Compruebe que mysqld está funcionando y que el socket: '/ tmp / mysql.sock' existe!
September 12th, 2006 21:43 Septiembre 12, 2006 21:43
just delete acaba de borrar
January 27th, 2007 02:06 27 de Enero, 2007 02:06
Hi, Hola,
I have installed freebsd 5.5 and now with your guideline instructions I have install mysql, php5 and apache2.2.But i do not know how to configure a website so I can test that if it works.Please help me with a link who can provide step by step instuctions or refer me some good basic book. He instalado FreeBSD 5,5 y ahora con su directriz instrucciones que he instalar mysql, php5 y apache2.2.But no sé cómo configurar un sitio web por lo que puede hacer una prueba de que, si works.Please que me ayude con un enlace que puede proporcionar paso a paso o instrucciones me refiero algunos buenos libros básicos.
Thanks. Gracias.
March 5th, 2007 21:24 Marzo 5, 2007 21:24
If you’re getting “mysql_install_db: Command not found.” after punching in “mysql_install_db”, you should try to cd to /usr/local/bin/ and then run “mysql_install_db”. Si usted está recibiendo "mysql_install_db: Command not found." Después de puñetazos en "mysql_install_db", usted debe tratar de cd a / usr / local / bin / y luego ejecutar "mysql_install_db".
Cheers. ¡Salud!.
March 5th, 2007 21:25 Marzo 5, 2007 21:25
Oh; and thanks for the great article! Oh, y gracias por el gran artículo!
November 12th, 2007 13:32 Noviembre 12, 2007 13:32
i ecountered the not found error while installing mysql, what should i do? i ecountered No se ha encontrado el error al instalar mysql, ¿Qué debo hacer? and what is the command rehash actually is? y ¿cuál es el comando rehash realmente es? thank you so much. muchas gracias.
November 12th, 2007 16:33 Noviembre 12, 2007 16:33
rehash is a command to ‘refresh’ the system. refrito es un comando para "refrescar" el sistema. Did it work after rehash. ¿Funcionó después de refrito.
January 11th, 2008 10:32 Enero 11, 2008 10:32
great tutorial! gran tutorial! thanks! gracias!
January 23rd, 2008 00:43 23 de enero de 2008 00:43
Where can I find these files on a MySql 5.1 install on FreeBSD 6.2? ¿Dónde puedo encontrar estos archivos en un 5,1 MySql instalar FreeBSD en 6,2?
my-huge.cnf, my-large.cnf, my-medim.cnf, my-small.cnf or my-innodb-heavy-4G.cnf my-huge.cnf, my-large.cnf, mi-medim.cnf, my-small.cnf o mi-innodb-pesado-4G.cnf
March 23rd, 2008 02:39 23 de Marzo, 2008 02:39
the my-huge.cnf, my-large.cnf, my-medim.cnf, my-small.cnf or my-innodb-heavy-4G.cnf are found in /usr/local/share/mysql/ el my-huge.cnf, my-large.cnf, mi-medim.cnf, my-small.cnf o mi-innodb-pesado-4G.cnf se encuentran en / usr / local / share / mysql /
August 2nd, 2008 07:21 2 de Agosto, 2008 07:21
On FreeBSD 7.0 you don’t need to manually install the databases and set permissions, that is done in the startup script the first time it is run. El 7,0 FreeBSD no es necesario instalar manualmente las bases de datos y establecer permisos, que se realiza en el script de arranque la primera vez que se ejecute.
Just make sure you have Sólo asegúrate de que tienes
mysql_enable=”YES” mysql_enable = "YES"
in /etc/rc.conf before you run mysql-server. en / etc / rc.conf antes de ejecutar mysql-server.
You could hence rewrite the install instructions to this: Se puede, por tanto, la reescritura de instrucciones para instalar el siguiente:
cd /usr/ports/databases/mysql50-server CD / usr/ports/databases/mysql50-server
make install clean make install limpio
echo ‘mysql_enable=”YES”‘ >> /etc/rc.conf echo 'mysql_enable = "YES"'>> / etc / rc.conf
/usr/local/etc/rc.d/mysql-server start / usr / local / etc / rc.d / mysql-server inicio
August 21st, 2008 13:06 21 de Agosto, 2008 13:06
Hey there. Hey allí. I was having trouble with the “mysql_install_db: command not found” when installing FreeBSD 7. Yo estaba teniendo problemas con el "mysql_install_db: comando no encontrado" al instalar FreeBSD 7. I ran the rehash command and then entered mysql_install_db again and it worked fine. Me corrió el refrito de mando y luego entró de nuevo mysql_install_db y funcionó bien.