最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

LinuxMysql知识学习篇

来源:懂视网 责编:小采 时间:2020-11-09 12:31:14
文档

LinuxMysql知识学习篇

LinuxMysql知识学习篇: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 -
推荐度:
导读LinuxMysql知识学习篇: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 -

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

很明显,安装成功了。如果安装失败了就卸载一次在安装一下就基本没有什么问题了。

linux

文档

LinuxMysql知识学习篇

LinuxMysql知识学习篇: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 -
推荐度:
标签: 学习 知识 linux
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top