mysql rpm 失败_LINUX-MYSQL多实例(rpm包安装-失败)

1、yum安装mysql:

[root@localhost Desktop]# cat /etc/yum.repos.d/rhel-local.repo

[rhel-source]

name=Red Hat Enterprise Linux $releasever - $basearch - Source

baseurl=file://"/media/RHEL_6.1 i386 Disc 1"/Server

enabled=1

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[root@localhost Desktop]# yum install mysql

Loaded plugins: product-id, refresh-packagekit, subscription-manager

Updating Red Hat repositories.

rhel-source  | 4.0 kB  00:00 ...

rhel-source/primary_db  | 2.4 MB  00:00 ...

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package mysql.i686 0:5.1.52-1.el6_0.1 will be installed

--> Finished Dependency Resolution

Dependencies Resolved

================================================================================

Package  Arch  Version  Repository  Size

================================================================================

Installing:

mysql  i686  5.1.52-1.el6_0.1  rhel-source  898 k

Transaction Summary

================================================================================

Install  1 Package(s)

Total download size: 898 k

Installed size: 2.3 M

Is this ok [y/N]: y

Downloading Packages:

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Warning: RPMDB altered outside of yum.

Installing : mysql-5.1.52-1.el6_0.1.i686  1/1

duration: 712(ms)

Installed products updated.

Installed:

mysql.i686 0:5.1.52-1.el6_0.1

Complete!

[root@localhost Desktop]#

[root@localhost Desktop]# yum install mysql-server

Loaded plugins: product-id, refresh-packagekit, subscription-manager

Updating Red Hat repositories.

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package mysql-server.i686 0:5.1.52-1.el6_0.1 will be installed

--> Processing Dependency: perl(DBI) for package: mysql-server-5.1.52-1.el6_0.1.i686

--> Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.1.52-1.el6_0.1.i686

--> Processing Dependency: perl-DBI for package: mysql-server-5.1.52-1.el6_0.1.i686

--> Running transaction check

---> Package perl-DBD-MySQL.i686 0:4.013-3.el6 will be installed

---> Package perl-DBI.i686 0:1.609-4.el6 will be installed

--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================

Package  Arch  Version  Repository  Size

=============================================================================================================================================================

Installing:

mysql-server  i686  5.1.52-1.el6_0.1  rhel-source  8.3 M

Installing for dependencies:

perl-DBD-MySQL  i686  4.013-3.el6  rhel-source  134 k

perl-DBI  i686  1.609-4.el6  rhel-source  707 k

Transaction Summary

=============================================================================================================================================================

Install  3 Package(s)

Total download size: 9.1 M

Installed size: 25 M

Is this ok [y/N]: y

Downloading Packages:

-------------------------------------------------------------------------------------------------------------------------------------------------------------

Total  28 MB/s | 9.1 MB  00:00

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Installing : perl-DBI-1.609-4.el6.i686  1/3

Installing : perl-DBD-MySQL-4.013-3.el6.i686  2/3

Installing : mysql-server-5.1.52-1.el6_0.1.i686  3/3

duration: 454(ms)

Installed products updated.

Installed:

mysql-server.i686 0:5.1.52-1.el6_0.1

Dependency Installed:

perl-DBD-MySQL.i686 0:4.013-3.el6  perl-DBI.i686 0:1.609-4.el6

Complete!

2、cp安装目录下的mysql所有文件到新目录:

[root@localhost lib]# cp mysql/* mysql_3307/

cp: omitting directory `mysql/mysql'

cp: cannot open `mysql/mysql.sock' for reading: No such device or address

cp: omitting directory `mysql/test'

[root@localhost lib]# /etc/init.d/mysqld stop

Stopping mysqld:  [  OK  ]

[root@localhost lib]# cp mysql/* mysql_3307/

cp: overwrite `mysql_3307/ibdata1'? y

cp: overwrite `mysql_3307/ib_logfile0'? y

cp: overwrite `mysql_3307/ib_logfile1'? y

cp: omitting directory `mysql/mysql'

cp: omitting directory `mysql/test'

[root@localhost lib]#

3、安装实例:

[root@localhost Desktop]# mysql_install_db  --datadir=/var/lib/mysql_3307 --user=mysql

Installing MySQL system tables...

OK

Filling help tables...

OK

To start mysqld at boot time you have to copy

support-files/mysql.server to the right place for your system

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'

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.

You can start the MySQL daemon with:

cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值