Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 3安装Web服务器的FreeBSD 6.0与Apache 2.2 , MySQL的5.0和PHP 5 -第3部分

Installing Apache 2.2, MySQL 5 and PHP 5 in FreeBSD 6.0 for a Reliable Web Server 安装的Apache 2.2 , MySQL的第5和PHP 5中的FreeBSD 6.0可靠的Web服务器

Part 3 - Installing MySQL Server 5 with FreeBSD Ports Collection第3部分-安装M ySQL服务器与F reeBSD第5集港口

  1. Login to the FreeBSD system as root, or su - root to get to super user environment.登录在FreeBSD系统的根,或者苏-根进入超级用户环境。
  2. Enter the following commands at FreeBSD command line interface (CLI) (Wait till each command to finish processing before running the next command):输入下面的命令在FreeBSD的命令行界面( CLI ) (等待到每个命令完成之前,处理未来运行命令) :

    cd /usr/ports/databases/mysql50-server的CD / usr/ports/databases/mysql50-server
    make install clean使安装清洁
    mysql_install_db --user=mysql mysql_install_db -M ySQL的用户=
    chown -R mysql /var/db/mysql/ chown - R的数据库是/ var /数据库/数据库/
    chgrp -R mysql /var/db/mysql/ chgrp - R的数据库是/ var /数据库/数据库/
    /usr/local/bin/mysqld_safe -user=mysql &的/ usr / local /斌/ mysqld_safe用户=数据库&

    Note: If you encounter Command not found error, use command rehash to update OS path environment variables.注:如果您遇到命令未发现错误,使用命令翻版更新操作系统路径环境变量。

  3. 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.该港口将安装脚本档案数据库, server.sh在/ usr / local的/ etc / rc.d这将有能力以启动MySQL服务器。 To enable MySQL server to start automatically after every FreeBSD server reboot, enter the following command in CLI:为了使MySQL服务器自动启动后,每一个FreeBSD的服务器重新开机,输入下面的命令在引导倡议:

    echo ‘mysql_enable=”YES”‘ >> /etc/ rc.conf回声' mysql_enable = “是” “ > ”的/ etc / rc.conf

  4. By default, MySQL default super user account - root - has no password (blank password).默认情况下, MySQL的默认的超级用户帐户-根-没有密码(空白密码)。 So it’s important to assign the administrator account password.因此,重要的是要指定管理员帐户密码。 To change the password to root user, enter the following command:要更改密码,以root用户,输入以下命令:

    mysqladmin -u root password newpassword mysqladmin聚氯乙烯root密码newpassword

    Replace newpassword with your own desired password. newpassword替换用自己想要的密码。

  5. 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.或者,要么我的副本, huge.cnf ,我国- large.cnf ,我国- medim.cnf ,我,我small.cnf或- InnoDB的,重4G.cnf (取决于使用和利用MySQL服务器)为我。合为是/ var /数据库/数据库这将使你能够调整和更改配置的服务器的具体MySQL服务器选择编辑文件。
  6. MySQL 5.0 installation done. 5.0 MySQL的安装工作。

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要说明:这是一台机器翻译网页这是“原样”提供,无保修。 Machine translation may be difficult to understand.机器翻译可能很难理解。 Please refer to请参阅 original English article英文原文的文章 whenever possible.只要有可能。

Share and contribute or get technical support and help at共享和贡献或获得技术支持和帮助 My Digital Life Forums 我的数字生活论坛 .



22 Responses to “Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 3” 22日回应“安装Web服务器的FreeBSD 6.0与Apache 2.2 , MySQL的5.0和PHP 5 -第3部分”

  1. Drache
    May 21st, 2006 13:12 2006年5月21日13:12
    1一月

    mysql_enable = mysql_enable =

  2. Administrator署长
    May 21st, 2006 14:07 2006年5月21日14:07
    2

    Thanks for pointing out, will update.谢谢指出,将更新。

  3. jan一月
    June 6th, 2006 11:08 2006年6月六号11:08
    3

    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.我stucked与数据库的一部分,您如何后,签发# mysqladmin聚氯乙烯root密码newpassword ,我发表#数据库聚氯乙烯根一p newpassword ,我总是得到拒绝访问的错误。 what did i miss?什么是我想念?

    thanks感谢

  4. Administrator署长
    June 6th, 2006 11:49 2006年6月六号11:49
    4

    jan, may be you have set the password for root. 1月,可能是您设置的密码根源。 Try to access mysql with -u userid and -p password option.尝试访问MySQL与聚氯乙烯帐号和一p 密码选项。 Or you can follow instruction或者,您也可以按照指令 here在这里 on how to change and reset your root password.关于如何改变和重设您的root密码。

  5. jan一月
    June 6th, 2006 14:32 2006年6月六号14:32
    5

    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.我试过所有的选项提到但它们都没有工作,所以我也重新安装一次,然后创建一个密码为MySQL root用户,我登录的根源,它的工作很好,我能够获得MySQL的壳,但当我发出命令mysqladmin创建一个密码为根,我收到一个错误,我尝试登入根和跆拳道我回来了同样的问题。 do u think i would be better off if i install phpmyadmin and change the root password from there?这样ü想我会更好,如果我安装phpmyadmin ,改变了root密码从那里?

  6. Administrator署长
    June 6th, 2006 16:56二零零六年6月6日16时56分
    6 6日

    Did you flush privileges after changing the password?你冲水特权后,改变了密码? The problem may be due to hashing of MySQL password.这个问题可能是由于散列的MySQL密码。 May be you can try the following commands after resetting your root password if it cannot works:可能是您可以尝试下面的命令后,重设您的root密码,如果它不能工作:

    mysql -u root mysql MySQL的聚氯乙烯根数据库
    > UPDATE user SET password=password(’secret’) WHERE user=’root’; “更新用户设置密码=密码( '秘密' )凡用户= '根' ;
    > flush privileges; “冲水特权;

    You may try phpmyadmin too, but I remembered I used to have exactly this same problem while phpMyAdmin didn’t help much.您可以尝试phpmyadmin太多,但我记得我曾经有正是这种相同的问题,而phpMyAdmin没有帮助很大。 Do let me know how you solve it.不要让我知道你如何解决这个问题。

  7. jan一月
    June 7th, 2006 13:14 2006年6月7日13:14
    7 7日

    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.你有权改变它通过phpmyadmin给了我同样的结果,所以我就是这样做的是改变一些设置config.inc.php的phpmyadmin ,改变auth_type = cookie和河豚= mypassphrase和一切被罚款。

  8. rich丰富
    August 18th, 2006 00:57 2006年8月18日00:57
    8 8日

    The problem is that mysql (version 5.x) is not starting with mysql_enable=”YES” in /etc/rc.conf.问题是,数据库( 5.x版)是不是开始mysql_enable = “是”在/ etc / rc.conf 。
    Im using FreeBSD v6.1.x.进出口使用的FreeBSD v6.1.x. I do not have the space problem between enable and the “=”.我没有空间之间的问题能够和“ = ” 。 The message I receive on bootup is “YES: notfound”.邮件我收到关于启动“是: notfound ” 。

    Any suggestions welcome.任何建议表示欢迎。

  9. Dom大教堂
    August 19th, 2006 10:45 06年八月19日10:45
    9 9日

    Ive followed this guide but when i run “mysql-server.sh start” it returns starting mysql and does nothing else.伊夫遵循了这一指导但是当我运行“数据库, server.sh启动”返回启动MySQL并没有别的。 i ran “mysql-server.sh status” and it returned “mysql is not running”我跑“数据库, server.sh地位” ,并返回“数据库没有运行”

    mysql_enable=”YES” is in rc.conf but is not starting. mysql_enable = “是”在rc.conf但没有启动。 any help?任何帮助吗?

  10. Administrator署长
    August 19th, 2006 11:25 06年八月19日11:25
    10 10个

    Check if you can run mysqladmin or other mysql tools.检查是否可以运行mysqladmin或其他数据库工具。 Also make sure your “YES” in rc.conf is using proper “, as the ” in the article has been changed.还请确保您“是”在rc.conf使用适当的“ ,因为”在文章中已变更。

  11. Dom大教堂
    August 19th, 2006 15:10 06年八月19日15:10
    11 11日

    rc.conf contains rc.conf载
    mysql_enable=”YES” mysql_enable = “是”
    apache22_enable=”YES” apache22_enable = “是”

    here is results from mysqladmin -user admin这里的结果mysqladmin用户管理

    mysqladmin: connect to server at ‘localhost’ failed mysqladmin :连接到服务器上的'本地'失败
    error: ‘Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)’错误: '无法连接到本地MySQL服务器通过插座' / tmp的/ mysql.sock ' ( 2 )
    Check that mysqld is running and that the socket: ‘/tmp/mysql.sock’ exists!检查mysqld正在运行的插座: ' / tmp的/ mysql.sock '存在!

  12. Jani Syed贾尼赛
    September 12th, 2006 21:43二零零六年九月12日21:43
    12 12日

    just delete删除

  13. Younah
    January 27th, 2007 02:06 07年1月27日02:06
    13

    Hi,您好,
    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.我已经安装的FreeBSD 5.5 ,现在与您的指导方针的指示我已经安装数据库, php5和apache2.2.But我不知道如何设定一个网站,这样我就可以测试,如果它works.Please帮助我联系谁可以提供一步一步instuctions或提及我一些良好的基本书籍。
    Thanks.谢谢。

  14. berry__
    March 5th, 2007 21:24 2007年3月5号21:24
    14

    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”.如果您收到“ mysql_install_db :命令没有找到。 ”冲压后在“ mysql_install_db ” ,你应该尝试的CD为/ usr / local /斌/然后运行“ mysql_install_db ” 。

    Cheers.干杯。

  15. berry__
    March 5th, 2007 21:25 2007年3月5号21:25
    15

    Oh; and thanks for the great article!噢;并感谢伟大的文章!

  16. bramz4ever
    November 12th, 2007 13:32 07年11月12号13:32
    16

    i ecountered the not found error while installing mysql, what should i do?字母i ecountered没有发现的错误,而安装MySQL ,我应该怎么办? and what is the command rehash actually is?什么是重复的命令实际上是什么? thank you so much.感谢你这么多。

  17. admin管理员
    November 12th, 2007 16:33 07年11月12号16:33
    17

    rehash is a command to ‘refresh’ the system.翻版是一个命令'刷新'的制度。 Did it work after rehash.没有工作后的翻版。

  18. nicky6
    January 11th, 2008 10:32 2008年1月11号10:32
    18

    great tutorial!伟大的教程! thanks!谢谢!

  19. Matt马特
    January 23rd, 2008 00:43 2008年1月23日0点43分
    19

    Where can I find these files on a MySql 5.1 install on FreeBSD 6.2?我在哪里可以找到这些档案对一个MySQL 5.1安装在FreeBSD 6.2 ?

    my-huge.cnf, my-large.cnf, my-medim.cnf, my-small.cnf or my-innodb-heavy-4G.cnf我- huge.cnf ,我国- large.cnf ,我国- medim.cnf ,我,我small.cnf或- InnoDB的,重4G.cnf

  20. Tyler泰勒
    March 23rd, 2008 02:39 2008年3月23号02:39
    20

    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/在我国, huge.cnf ,我国- large.cnf ,我国- medim.cnf ,我,我small.cnf或- InnoDB的,重4G.cnf被发现在/ usr / local /共享/数据库/

  21. DrTebi
    August 2nd, 2008 07:21 2008年8月2号07:21
    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.在FreeBSD 7.0就不需要手动安装数据库,并设置权限,这样做的启动脚本第一次运行。

    Just make sure you have您只要确定有
    mysql_enable=”YES” mysql_enable = “是”
    in /etc/rc.conf before you run mysql-server.在/ etc / rc.conf然后再运行数据库服务器。

    You could hence rewrite the install instructions to this:你可以因此改写安装此:

    cd /usr/ports/databases/mysql50-server的CD / usr/ports/databases/mysql50-server
    make install clean使安装清洁
    echo ‘mysql_enable=”YES”‘ >> /etc/rc.conf回声' mysql_enable = “是” “ > ”的/ etc / rc.conf
    /usr/local/etc/rc.d/mysql-server start的/ usr / local的/ etc / rc.d /数据库服务器启动

  22. Leighland
    August 21st, 2008 13:06 2008年8月21号13:06
    22

    Hey there.嘿存在。 I was having trouble with the “mysql_install_db: command not found” when installing FreeBSD 7.我是有问题的“ mysql_install_db :命令未找到”当安装的FreeBSD 7 。 I ran the rehash command and then entered mysql_install_db again and it worked fine.我跑的翻版命令,然后再次进入mysql_install_db和它的罚款。

Leave a Reply留下一个回复

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> 您可以使用这些标签: href="" title="">的<a <abbr title=""> <acronym title="">的<b> <blockquote cite=""> <cite>的<code> “删除日期时间= “ ” “的<em> <i> <q cite=""> <strike>的<strong>

Subscribe without commenting订阅没有评论


Custom Search

New Articles新文章

Incoming Search Terms for the Article收到的搜索字词的文章

mysql freebsd 数据库的FreeBSD - - freebsd mysql FreeBSD的数据库 - - freebsd phpmyadmin FreeBSD的phpmyadmin - - freebsd mysql install FreeBSD的MySQL的安装 - - freebsd install mysql FreeBSD的安装数据库 - - freebsd mysql 5 FreeBSD的数据库五日 - - freebsd mysql config FreeBSD的数据库配置 - - install mysql freebsd FreeBSD的安装数据库 - - always get in mysql without password 总是MySQL中没有密码 - - apache2 bsd install BSD的安装的Apache2 - - apache mysql freebsd 阿帕奇数据库的FreeBSD - - apache 2.2 is not starting 阿帕奇2.2没有开始 - - create a web page in apache server freeBSD 创建网页,在Apache服务器的FreeBSD - - freebsd set up mysql FreeBSD上建立数据库 - - freebsd 7.0 installing apache FreeBSD的安装阿帕奇7.0 - - freebsd mysql enable FreeBSD的数据库启用 - - freebsd apache mysql php howto FreeBSD的阿帕奇数据库的PHP如何 - - freebsd webserver installation FreeBSD的网络服务器安装 - - freebsd starting mysql FreeBSD的启动MySQL - - freebsd rc.conf mysql FreeBSD的rc.conf数据库 - - howto php apache freebsd 如何PHP的阿帕奇的FreeBSD - - how to install mysql in freebsd 如何安装数据库中的FreeBSD - - how to install mysql in freebsd 7 如何安装数据库中的FreeBSD 7日 - - install mysql on freebsd 安装数据库在FreeBSD - - install apache freebsd 安装Apache的FreeBSD - - mysql on freebsd 数据库在FreeBSD - - mysql-server freebsd 数据库服务器的FreeBSD - - mysql_enable mysql_enable - - starting mysql freebsd FreeBSD的启动MySQL - - apache2+php in freebsd 7 的Apache2 + PHP在FreeBSD的第7 - - apache22 "freebsd 5.5" apache22 “的FreeBSD 5.5 ” - - freebsd apache shell environment variables FreeBSD的阿帕奇外壳环境变量 - - freebsd mysql5 FreeBSD的mysql5 - - freebsd apache php howto FreeBSD的阿帕奇的PHP如何 - - freebsd setting up mysql socket FreeBSD上建立数据库插座 - - freebsd phpmyadmin howto FreeBSD的phpmyadmin如何 - - freebsd apache passwords FreeBSD的阿帕奇密码 - - Installing Apache 2.2, MySQL 5 and PHP 5 in FreeBSD 6.0 安装的Apache 2.2 , MySQL的第5和PHP 5中的FreeBSD 6.0 - - Installing Apache Mysql and PHP on FreeBSD 安装Apache的数据库和PHP在FreeBSD - - install web server freebsd 安装网络服务器的FreeBSD - - kaspersky local apache not running 卡巴斯基地方阿帕奇没有运行 - - mysql freebsd install 数据库的FreeBSD安装 - - MySQL in freeBSD 在FreeBSD的MySQL的 - - mysql config freebsd 数据库配置的FreeBSD - - restart mysql server in freebsd 重新启动MySQL服务器中的FreeBSD - - restart mysql in freebsd 重新启动数据库中的FreeBSD - - Virtual PC 2007 freebsd 6 虚拟PC 2007的FreeBSD 6日 - - where is rehash freebsd 7.0 如果是翻版的FreeBSD 7.0 - -