首页 / LINUX / LinuxMysql知识学习篇
LinuxMysql知识学习篇
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了LinuxMysql知识学习篇,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含3194字,纯文字阅读大概需要5分钟。
内容图文
![LinuxMysql知识学习篇](/upload/InfoBanner/zyjiaocheng/554/83cc55d5d5474835aaf76b638a93fc5b.jpg)
1.查看Linux 是否安装了Mysql[root@localhost zhoulinghong]# rpm -qa |grep MySQL MySQL-server-community-5.1.22-0.rhel4已经安装了
1.查看Linux 是否安装了Mysql
[root@localhost zhoulinghong]# rpm -qa |grep MySQL
MySQL-server-community-5.1.22-0.rhel4
已经安装了。
2.Linux 下安装mysql(rpm)
[root@localhost zhoulinghong]# rpm -ivh MySQL-server-community-5.1.22-0.rhel4.i386.rpm
warning: MySQL-server-community-5.1.22-0.rhel4.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
error: Failed dependencies:
perl(DBI) is needed by MySQL-server-community-5.1.22-0.rhel4.i386
Suggested resolutions:
perl-DBI-1.40-5.i386.rpm
呵呵,出错了。Linux的弊端就出现了。安装软件的时候相互依赖太强了。。。看到上面错误信息是缺少perl-DBI-1.40-5.i386.rpm包。没有办法只能安装了
3.安装依赖包
perl-DBI-1.40-5.i386.rpm 这个包在RedHat的CD2中。不用多想挂载光驱吧。
[root@localhost mnt]# mount /dev/cdrom /mnt/cdrom
挂载成功以后。转到 /mnt/cdrom/RedHat/RPMS目录下面就有perl-DBI-1.40-5.i386.rpm 这个包了。
[root@localhost RPMS]# rpm -ivh perl-DBI-1.40-5.i386.rpm
warning: perl-DBI-1.40-5.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
1:perl-DBI ########################################### [100%]
安装成功。
OK,到现在的依赖包也安装完了,,就可以安装mysql了。(注意:因为大家的环境不一样,中间可能有其他的依赖包需要安装,方法照上面就好了。)
4.安装Mysql
[root@localhost zhoulinghong]# rpm -ihv MySQL-server-community-5.1.22-0.rhel4.i386.rpm
warning: MySQL-server-community-5.1.22-0.rhel4.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
Preparing... ########################################### [100%]
1:MySQL-server-community ########################################### [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 localhost.localdomain password 'new-password'
See the manual for more instructions.
Please report any problems with the /usr/bin/mysqlbug script!
The latest information about MySQL is available on the web at
Support MySQL by buying support/licenses at
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
Starting MySQL[ OK ]
Giving mysqld 2 seconds to start
很明显,安装成功了。如果安装失败了就卸载一次在安装一下就基本没有什么问题了。
内容总结
以上是互联网集市为您收集整理的LinuxMysql知识学习篇全部内容,希望文章能够帮你解决LinuxMysql知识学习篇所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。