首页 > 代码库 > mysql安装

mysql安装

[root@c1 rpm]# ll
总用量 25712
-rw-r--r--. 1 root root 9314124 7月 22 15:04 kernel-devel-3.10.0-123.el7.x86_64.rpm
-rw-r--r--. 1 root root 6345418 7月 23 10:11 MySQL-client-5.0.16-0.i386.rpm
-rw-r--r--. 1 root root 10665917 7月 23 10:11 MySQL-server-5.0.16-0.i386.rpm
[root@c1 rpm]# rpm -ivh MySQL-client-5.0.16-0.i386.rpm
准备中... ################################# [100%]
file /usr/bin/msql2mysql from install of MySQL-client-5.0.16-0.i386 conflicts with file from package mariadb-1:5.5.37-1.el7_0.x86_64
file /usr/bin/mysql from install of MySQL-client-5.0.16-0.i386 conflicts with file from package mariadb-1:5.5.37-1.el7_0.x86_64
file /usr/bin/mysql_find_rows from install of MySQL-client-5.0.16-0.i386 conflicts with file from package mariadb-1:5.5.37-1.el7_0.x86_64
file /usr/bin/mysql_waitpid from install of MySQL-client-5.0.16-0.i386 conflicts with file from package mariadb-1:5.5.37-1.el7_0.x86_64
file /usr/bin/mysqlaccess from install of MySQL-client-5.0.16-0.i386 conflicts with file from package mariadb-1:5.5.37-1.el7_0.x86_64
file /usr/bin/mysqladmin from install of MySQL-client-5.0.16-0.i386 conflicts with file from package mariadb-1:5.5.37-1.el7_0.x86_64
file /usr/bin/mysqlbinlog from install of MySQL-client-5.0.16-0.i386 conflicts with file from package mariadb-1:5.5.37-1.el7_0.x86_64
file /usr/bin/mysqlcheck from install of MySQL-client-5.0.16-0.i386 conflicts with file from package mariadb-1:5.5.37-1.el7_0.x86_64
file /usr/bin/mysqldump from install of MySQL-client-5.0.16-0.i386 conflicts with file from package mariadb-1:5.5.37-1.el7_0.x86_64
file /usr/bin/mysqlimport from install of MySQL-client-5.0.16-0.i386 conflicts with file from package mariadb-1:5.5.37-1.el7_0.x86_64
file /usr/bin/mysqlshow from install of MySQL-client-5.0.16-0.i386 conflicts with file from package mariadb-1:5.5.37-1.el7_0.x86_64
file /usr/share/man/man1/mysql.1.gz from install of MySQL-client-5.0.16-0.i386 conflicts with file from package mariadb-1:5.5.37-1.el7_0.x86_64
file /usr/share/man/man1/mysqlaccess.1.gz from install of MySQL-client-5.0.16-0.i386 conflicts with file from package mariadb-1:5.5.37-1.el7_0.x86_64
file /usr/share/man/man1/mysqladmin.1.gz from install of MySQL-client-5.0.16-0.i386 conflicts with file from package mariadb-1:5.5.37-1.el7_0.x86_64
file /usr/share/man/man1/mysqldump.1.gz from install of MySQL-client-5.0.16-0.i386 conflicts with file from package mariadb-1:5.5.37-1.el7_0.x86_64
file /usr/share/man/man1/mysqlshow.1.gz from install of MySQL-client-5.0.16-0.i386 conflicts with file from package mariadb-1:5.5.37-1.el7_0.x86_64
[root@c1 rpm]# yum -y remove mariadb-*
已加载插件:fastestmirror, langpacks
正在解决依赖关系
--> 正在检查事务
---> 软件包 mariadb.x86_64.1.5.5.37-1.el7_0 将被 删除
---> 软件包 mariadb-devel.x86_64.1.5.5.37-1.el7_0 将被 删除
---> 软件包 mariadb-libs.x86_64.1.5.5.37-1.el7_0 将被 删除
--> 正在处理依赖关系 libmysqlclient.so.18()(64bit),它被软件包 2:postfix-2.10.1-6.el7.x86_64 需要
--> 正在处理依赖关系 libmysqlclient.so.18()(64bit),它被软件包 php-mysql-5.4.16-21.el7.x86_64 需要
--> 正在处理依赖关系 libmysqlclient.so.18(libmysqlclient_18)(64bit),它被软件包 2:postfix-2.10.1-6.el7.x86_64 需要
--> 正在处理依赖关系 libmysqlclient.so.18(libmysqlclient_18)(64bit),它被软件包 php-mysql-5.4.16-21.el7.x86_64 需要
--> 正在检查事务
---> 软件包 php-mysql.x86_64.0.5.4.16-21.el7 将被 删除
---> 软件包 postfix.x86_64.2.2.10.1-6.el7 将被 删除
--> 解决依赖关系完成

依赖关系解决

=============================================================================================================================
Package 架构 版本 源 大小
=============================================================================================================================
正在删除:
mariadb x86_64 1:5.5.37-1.el7_0 @updates 49 M
mariadb-devel x86_64 1:5.5.37-1.el7_0 @updates 3.3 M
mariadb-libs x86_64 1:5.5.37-1.el7_0 @updates 4.4 M
为依赖而移除:
php-mysql x86_64 5.4.16-21.el7 @base 232 k
postfix x86_64 2:2.10.1-6.el7 @anaconda 12 M

事务概要
=============================================================================================================================
移除 3 软件包 (+2 依赖软件包)

安装大小:69 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在删除 : 1:mariadb-devel-5.5.37-1.el7_0.x86_64 1/5
正在删除 : php-mysql-5.4.16-21.el7.x86_64 2/5
正在删除 : 2:postfix-2.10.1-6.el7.x86_64 3/5
正在删除 : 1:mariadb-5.5.37-1.el7_0.x86_64 4/5
正在删除 : 1:mariadb-libs-5.5.37-1.el7_0.x86_64 5/5
验证中 : php-mysql-5.4.16-21.el7.x86_64 1/5
验证中 : 1:mariadb-5.5.37-1.el7_0.x86_64 2/5
验证中 : 2:postfix-2.10.1-6.el7.x86_64 3/5
验证中 : 1:mariadb-libs-5.5.37-1.el7_0.x86_64 4/5
验证中 : 1:mariadb-devel-5.5.37-1.el7_0.x86_64 5/5

删除:
mariadb.x86_64 1:5.5.37-1.el7_0 mariadb-devel.x86_64 1:5.5.37-1.el7_0 mariadb-libs.x86_64 1:5.5.37-1.el7_0

作为依赖被删除:
php-mysql.x86_64 0:5.4.16-21.el7 postfix.x86_64 2:2.10.1-6.el7

完毕!
[root@c1 rpm]# rpm -ivh MySQL-client-5.0.16-0.i386.rpm
准备中... ################################# [100%]
正在升级/安装...
1:MySQL-client-5.0.16-0 ################################# [100%]
[root@c1 rpm]# rpm -ivh MySQL-server-5.0.16-0.i386.rpm
准备中... ################################# [100%]
正在升级/安装...
1:MySQL-server-5.0.16-0 ################################# [100%]
140723 10:15:04 [Warning] Asked for 196608 thread stack, but got 126976
140723 10:15:05 [Warning] Asked for 196608 thread stack, but got 126976
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 c1.local 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
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com
Starting MySQL................................... ERROR!

这个报错是selinux引起的,修改

/etc/selinux/config中:

把SELINUX=enforcing

改为:SELINUX=disabled

保存,重启机器后mysql已经启动完毕。