快速业务通道

RedHat4 上安装MySql5

作者 佚名技术 来源 Linux系统 浏览 发布时间 2012-04-14

1, 从http://www.mysql.com/downloads/ 上下载以下两个安装包:
MySQL-server-5.5.8-1.linux2.6.x86_64.rpm
MySQL-client-5.5.8-1.linux2.6.x86_64.rpm

2, 安装server包:
# rpm -ivh MySQL-server-5.5.8-1.linux2.6.x86_64.rpm warning: MySQL-server-5.5.8-1.linux2.6.x86_64.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 error: Failed dependencies: MySQL conflicts with mysql-4.1.20-1.RHEL4.1.i386 MySQL conflicts with mysql-4.1.20-2.RHEL4.1.0.1.x86_64 碰到这个错误,需要先把原来的mysql4安装包卸载掉:
# rpm -e mysql-4.1.20-1.RHEL4.1 –nodeps # rpm -e mysql-4.1.20-2.RHEL4.1.0.1.x86_64 –nodeps 重新进行安装: # rpm -ivh MySQL-server-5.5.8-1.linux2.6.x86_64.rpm warning: MySQL-server-5.5.8-1.linux2.6.x86_64.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 Preparing... ########################################### [100%] 1:MySQL-server ########################################### [100%] PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /usr/bin/mysqladmin -u root password ''new-password'' /usr/bin/mysqladmin -u root -h browsing04.china.nsn-net.net password ''new-password'' Alternatively you can run: /usr/bin/mysql_secure_installation which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers. See the manual for more instructions. Please report any problems with the /usr/bin/mysqlbug script! Notes regarding SELinux on this platform: ========================================= The default policy might cause server startup to fail because it is not allowed to access critical files. In this case, please update your installation. The default policy might also cause inavailability of SSL related features because the server is not allowed to access /dev/random and /dev/urandom. If this is a problem, please do the following: 1) install selinux-policy-targeted-sources from your OS vendor 2) add the following two lines to /etc/selinux/targeted/src/policy/domains/program/mysqld.te: allow mysqld_t random_device_t:chr_file read; allow mysqld_t urandom_device_t:chr_file read; 3) cd to /etc/selinux/targeted/src/policy and issue the following command: make load 3, 安装Client 包: # rpm -ivh MySQL-client-5.5.8-1.linux2.6.x86_64.rpm warning: MySQL-client-5.5.8-1.linux2.6.x86_64.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 Preparing... ########################################### [100%] 1:MySQL-client ########################################### [100%] 4, 启动MySql: # service mysql start Starting MySQL......... [ OK ] 5,修改Root密码: # mysqladmin -u root password ''password'' 6,修改Root配置,使Root可以远程登录进行管理: # mysql Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号