Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 3 Instalando Web Server no FreeBSD 6,0 a 2,2 Apache, MySQL e 5,0 PHP 5 - Parte 3
Installing Apache 2.2, MySQL 5 and PHP 5 in FreeBSD 6.0 for a Reliable Web Server Instalando 2,2 Apache, MySQL e PHP 5 em 5 FreeBSD 6,0 Confiável para um servidor da Web
Part 3 - Installing MySQL Server 5 with FreeBSD Ports Collection Parte 3 - Instalando o MySQL Server com 5 FreeBSD Ports Collection
- Login to the FreeBSD system as root, or su - root to get to super user environment. Entrar FreeBSD para o sistema como root, ou su - raiz para obter a super usuário ambiente.
- Enter the following commands at FreeBSD command line interface (CLI) (Wait till each command to finish processing before running the next command): Digite os seguintes comandos no FreeBSD interface de linha de comando (CLI) (Espere até terminar cada comando para tratamento antes de executar o próximo comando):
cd /usr/ports/databases/mysql50-server CD / usr/ports/databases/mysql50-server
make install clean make install clean
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: Se você encontrar Comando não encontrado erro, use comando rehash para atualizar SO caminho variáveis de ambiente.
- 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. A instalação portuária irá colocar um arquivo script mysql-server.sh em / usr / local / etc / rc.d, que tem capacidade para iniciar o MySQL server. To enable MySQL server to start automatically after every FreeBSD server reboot, enter the following command in CLI: Para ativar o MySQL servidor para iniciar automaticamente após cada reinicialização FreeBSD servidor, digite o seguinte comando na 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). Por padrão, o MySQL padrão super usuário conta - raiz - não tem password (senha em branco). So it’s important to assign the administrator account password. Por isso é importante para atribuir a conta do administrador senha. To change the password to root user, enter the following command: Para alterar a senha de usuário root, digite o seguinte comando:
mysqladmin -u root password newpassword mysqladmin-u root password newpassword
Replace newpassword with your own desired password. Substituir newpassword com a sua própria senha desejada.
- 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, quer copiar my-huge.cnf, my-large.cnf, my-medim.cnf, my-small.cnf ou InnoDB-meu-pesado-4G.cnf (dependendo do uso e aproveitamento do servidor MySQL), como o meu . CNF para / var / db / mysql que irá permitir-lhe tweak e alterar a configuração do servidor-servidor MySQL opções específicas, editando o arquivo.
- MySQL 5.0 installation done. MySQL 5,0 instalação feito.
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. IMPORTANTE: Esta é uma página traduzida máquina que é fornecida "como está" sem garantia. Machine translation may be difficult to understand. A tradução automática pode ser difícil de compreender. Please refer to Por favor referir-se a original English article Inglês original article whenever possible. sempre que possível.
Share and contribute or get technical support and help at Compartilhe e contribuir ou obter suporte técnico e ajudar a My Digital Life Forums Minha vida digital Fóruns .
Related Articles Artigos relacionados
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 4 Instalando Web Server no FreeBSD 6,0 a 2,2 Apache, MySQL e 5,0 PHP 5 - Parte 4
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 5 Instalando Web Server no FreeBSD 6,0 a 2,2 Apache, MySQL e 5,0 PHP 5 - Parte 5
- Easily Set Up Web Server with XAMPP Facilmente criado com o servidor web XAMPP
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 1 Instalar Web Server no Windows XP com Apache2, PHP5 e MySQL4 - Parte 1
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 3 Instalar Web Server no Windows XP com Apache2, PHP5 e MySQL4 - Parte 3
- Using phpMyAdmin for Effective MySQL Management in Windows XP Usando phpMyAdmin para a Gestão Eficaz MySQL no Windows XP
- FreeBSD Apache HTTP Accept Filter Error FreeBSD Apache HTTP aceitar filtro erro
- PHP 5 Unable to Open HTTP Request Stream with fopen or fsockopen Functions PHP 5 não foi possível abrir a solicitação HTTP Stream fopen ou fsockopen Funções
- Enable Logging of Slow Queries (Slow Query Log) in MySQL Database Ativar registro de Consultas Lento (Slow Query Log) no MySQL Database
- Enable MySQL InnoDB Storage Engine Support in XAMPP Installation Ativar MySQL motor de armazenamento InnoDB apoio na instalação XAMPP

































May 21st, 2006 13:12 21 de maio de 2006 13:12
mysql_enable = mysql_enable =
May 21st, 2006 14:07 21 de maio de 2006 14:07
Thanks for pointing out, will update. Obrigado por apontar, serão atualizados.
June 6th, 2006 11:08 6 de junho de 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. Eu estou com o mysql stucked parte do seu howto, após emissão # mysqladmin-u root password newpassword, i emitidos # mysql-u root-p newpassword, eu sempre obter o acesso negado erro. what did i miss? O que é que eu perca?
thanks obrigado
June 6th, 2006 11:49 6 de junho de 2006 11:49
jan, may be you have set the password for root. jan, pode ser que você definiu a senha para a raiz. Try to access mysql with -u userid and -p password option. Tente acessar com mysql-u userid e senha opção-p. Or you can follow instruction Ou você pode seguir instruções here aqui on how to change and reset your root password. sobre a forma de alterar e redefinir sua senha de root.
June 6th, 2006 14:32 6 de junho de 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. Tentei todas as opções mencionadas, mas nenhum deles trabalhava, então eu fiz uma nova instalação de novo, antes de criar uma senha para o usuário mysql raiz, i conectado na raiz e como ele trabalhou bem, tive a oportunidade de obter um mysql shell, mas i quando o comando mysqladmin para criar uma senha para a raiz, eu recebi um erro, eu tentei fazer login como raiz e wtf eu estou de volta com o mesmo problema. do u think i would be better off if i install phpmyadmin and change the root password from there? u i fazer pensar seria melhor se eu instalar phpMyAdmin e mudar a senha do root a partir de lá?
June 6th, 2006 16:56 6 de junho de 2006 16:56
Did you flush privileges after changing the password? Você flush privilégios após mudar a senha? The problem may be due to hashing of MySQL password. O problema pode ser devido ao MySQL hash de senha. May be you can try the following commands after resetting your root password if it cannot works: Pode ser que você pode tentar usar os seguintes comandos após raiz redefinir sua senha se não funciona:
mysql -u root mysql mysql-u root mysql
> UPDATE user SET password=password(’secret’) WHERE user=’root’; > UPDATE user SET password = password ( 'secreto') WHERE user = 'root';
> flush privileges; > Flush privilégios;
You may try phpmyadmin too, but I remembered I used to have exactly this same problem while phpMyAdmin didn’t help much. Você pode tentar phpMyAdmin também, mas eu me lembrava de ter usado exactamente o mesmo problema, enquanto phpMyAdmin não ajudar muito. Do let me know how you solve it. Não deixe-me saber como você resolve-la.
June 7th, 2006 13:14 7o junho 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. você está mudando-lo através da direita phpMyAdmin deu-me o mesmo resultado, pelo que o que fiz foi mudar alguns ajustes no config.inc.php do phpMyAdmin, alterar o cookie e blowfish auth_type = = mypassphrase e tudo foi bem.
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. O problema é que o MySQL (versão 5.x) não está começando com mysql_enable = "SIM" no arquivo / 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 “=”. Eu não tenho problema entre o espaço e permitir a "=". The message I receive on bootup is “YES: notfound”. A mensagem que recebo é a bootup "SIM: notfound".
Any suggestions welcome. Todas as sugestões bem-vindos.
August 19th, 2006 10:45 19 de agosto de 2006 10h45
Ive followed this guide but when i run “mysql-server.sh start” it returns starting mysql and does nothing else. Ive seguir este guia, mas quando eu corro "mysql-server.sh começar", retorna a começar mysql e faz mais nada. i ran “mysql-server.sh status” and it returned “mysql is not running” i decorreu "mysql-server.sh status" e ele retornou "mysql não está funcionando"
mysql_enable=”YES” is in rc.conf but is not starting. mysql_enable = "SIM" está em rc.conf mas não está começando. any help? qualquer ajuda?
August 19th, 2006 11:25 19 de agosto de 2006 11h25
Check if you can run mysqladmin or other mysql tools. Verifique se você pode executar mysqladmin ou outras ferramentas mysql. Also make sure your “YES” in rc.conf is using proper “, as the ” in the article has been changed. Certifique-se também de seu "SIM" no rc.conf está usando correcta ", como a", no artigo foi alterado.
August 19th, 2006 15:10 19 de agosto de 2006 15:10
rc.conf contains rc.conf contém
mysql_enable=”YES” mysql_enable = "SIM"
apache22_enable=”YES” apache22_enable = "SIM"
here is results from mysqladmin -user admin aqui é resultado de mysqladmin-usuário admin
mysqladmin: connect to server at ‘localhost’ failed mysqladmin: conectar ao servidor em 'localhost' falhou
error: ‘Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)’ Erro: "Não é possível conectar ao servidor MySQL local através de socket '/ tmp / mysql.sock' (2)"
Check that mysqld is running and that the socket: ‘/tmp/mysql.sock’ exists! Verifique se o mysqld está sendo executado e que o socket: '/ tmp / mysql.sock "existe!
September 12th, 2006 21:43 12 de setembro de 2006 21:43
just delete basta apagar
January 27th, 2007 02:06 27 de janeiro de 2007 02:06
Hi, Oi,
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. Tenho instalado FreeBSD 5,5 e agora com a sua orientação instruções tenho instalar o MySQL, php5 e apache2.2.But não sei como configurar um site para que eu possa testar works.Please que, se ele me ajudar com um link que pode proporcionar passo a passo instuctions ou referir-me algumas boas livro básico.
Thanks. Obrigado.
March 5th, 2007 21:24 5 de março de 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”. Se você estiver recebendo "mysql_install_db: Comando não encontrado." Após perfuração em "mysql_install_db", você deve tentar a cd / usr / local / bin / e, em seguida, execute "mysql_install_db".
Cheers. Felicidades.
March 5th, 2007 21:25 5 de março de 2007 21:25
Oh; and thanks for the great article! Ah, e graças ao grande artigo!
November 12th, 2007 13:32 12 de novembro de 2007 13:32
i ecountered the not found error while installing mysql, what should i do? i ecountered não encontrou o erro ao instalar mysql, o que devo fazer? and what is the command rehash actually is? e qual é o comando rehash realmente é? thank you so much. muito obrigado.
November 12th, 2007 16:33 12 de novembro de 2007 16:33
rehash is a command to ‘refresh’ the system. rehash é um comando para "refrescar" o sistema. Did it work after rehash. Será que trabalhar depois rehash.
January 11th, 2008 10:32 11 de janeiro de 2008 10:32
great tutorial! grande tutorial! thanks! obrigado!
January 23rd, 2008 00:43 23 de janeiro de 2008 00:43
Where can I find these files on a MySql 5.1 install on FreeBSD 6.2? Onde posso encontrar estes arquivos em um MySql 5,1 instalar em 6,2 FreeBSD?
my-huge.cnf, my-large.cnf, my-medim.cnf, my-small.cnf or my-innodb-heavy-4G.cnf my-huge.cnf, my-large.cnf, my-medim.cnf, my-small.cnf ou InnoDB-meu-pesado-4G.cnf
March 23rd, 2008 02:39 23 de março de 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/ o meu-huge.cnf, my-large.cnf, my-medim.cnf, my-small.cnf ou InnoDB-meu-pesado-4G.cnf são encontradas em / usr / local / share / mysql /
August 2nd, 2008 07:21 2 de agosto de 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. On FreeBSD 7,0 você não precisa instalar manualmente as bases de dados e definir permissões, que é feito no script de inicialização a primeira vez que for executado.
Just make sure you have Basta ter certeza de que
mysql_enable=”YES” mysql_enable = "SIM"
in /etc/rc.conf before you run mysql-server. no arquivo / etc / rc.conf antes de você executar mysql-server.
You could hence rewrite the install instructions to this: Você poderia, portanto, reescrever as instruções para instalar este:
cd /usr/ports/databases/mysql50-server CD / usr/ports/databases/mysql50-server
make install clean make install clean
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 início
August 21st, 2008 13:06 21 de agosto de 2008 13:06
Hey there. Hey there. I was having trouble with the “mysql_install_db: command not found” when installing FreeBSD 7. Eu estava tendo problemas com o "mysql_install_db: command not found" ao instalar FreeBSD 7. I ran the rehash command and then entered mysql_install_db again and it worked fine. Eu dirigia o comando rehash mysql_install_db e, em seguida, entrou novamente e ela trabalhou bem.