菜单

转 Linux平台卸载MySQL计算

2019年5月2日 - www6165com

 

Linux如何查看YUM的装置目录,linux查看yum

Linux下怎么查看使用YUM安装过的包的安装路线呢?
在搞领会这么些题近年来,大家先来询问一下YUM。 YUM(全名称叫 Yellow dog
Updater,
Modified)是3个在Fedora和RedHat以及CentOS中的Shell前端软件包管理器。基于RPM包管理,能够从内定的服务器自动下载RPM包并且安装,能够自动管理重视性关系,并且2遍安装具备信赖的软件包,幸免了手动安装的劳动(搜索能源、下载;放到钦点目录安装;管理依赖关系并下载正视关系的包实行安装)。所以用yum安装,实质上是用RPM安装,所以RPM查询新闻的一声令下都可用。

 

设若选择RPM安装了部分包,一般的话,RPM私下认可安装路线如下:

 

  Directory

Contents of Directory

/etc

一些配置文件的目录,例如/etc/init.d/mysql

 

/usr/bin

一些可执行文件

/usr/lib

一些程序使用的动态函数库

/usr/share/doc

一些基本的软件使用手册与帮助文档

/usr/share/man

一些man page文件

 

以MySQL的装置为例,大家选用RPM格局安装了MySQL的多个包,其实rpm有多个参数-l和-c能够协助大家查阅具体的装置路径。

 

-l 展现软件包中的文件列表

-c 展现配置文件列表

 

那正是说大家得以应用“rpm -ql  包名”来查阅具体的装置路线。如下所示:

 

 

 

[[email protected]
~]# rpm -qa | grep -i mysql

MySQL-server-advanced-5.6.20-1.rhel5

MySQL-client-advanced-5.6.20-1.rhel5

[[email protected]
~]# rpm -ql MySQL-client-advanced-5.6.20-1.rhel5

/usr/bin/msql2mysql

/usr/bin/mysql

/usr/bin/mysql_config_editor

/usr/bin/mysql_find_rows

/usr/bin/mysql_waitpid

/usr/bin/mysqlaccess

/usr/bin/mysqlaccess.conf

/usr/bin/mysqladmin

/usr/bin/mysqlbinlog

/usr/bin/mysqlcheck

/usr/bin/mysqldump

/usr/bin/mysqlimport

/usr/bin/mysqlshow

/usr/bin/mysqlslap

/usr/share/man/man1/msql2mysql.1.gz

/usr/share/man/man1/mysql.1.gz

/usr/share/man/man1/mysql_config_editor.1.gz

/usr/share/man/man1/mysql_find_rows.1.gz

/usr/share/man/man1/mysql_waitpid.1.gz

/usr/share/man/man1/mysqlaccess.1.gz

/usr/share/man/man1/mysqladmin.1.gz

/usr/share/man/man1/mysqlbinlog.1.gz

/usr/share/man/man1/mysqlcheck.1.gz

/usr/share/man/man1/mysqldump.1.gz

/usr/share/man/man1/mysqlimport.1.gz

/usr/share/man/man1/mysqlshow.1.gz

/usr/share/man/man1/mysqlslap.1.gz

 

 

[[email protected]
tmp]# rpm -ql MySQL-server-advanced-5.6.20-1.rhel5

/etc/init.d/mysql

/etc/logrotate.d/mysql

/etc/my.cnf

/usr/bin/innochecksum

/usr/bin/my_print_defaults

/usr/bin/myisam_ftdump

/usr/bin/myisamchk

/usr/bin/myisamlog

/usr/bin/myisampack

/usr/bin/mysql_convert_table_format

/usr/bin/mysql_fix_extensions

/usr/bin/mysql_install_db

/usr/bin/mysql_plugin

/usr/bin/mysql_secure_installation

/usr/bin/mysql_tzinfo_to_sql

/usr/bin/mysql_upgrade

/usr/bin/mysql_zap

/usr/bin/mysqlbug

/usr/bin/mysqld_multi

/usr/bin/mysqld_safe

/usr/bin/mysqldumpslow

/usr/bin/mysqlhotcopy

/usr/bin/mysqltest

……………………………………………..

 

 

 

[[email protected] ~]# rpm -qc MySQL-server-advanced-5.6.20-1.rhel5

 

/etc/logrotate.d/mysql

 

/etc/my.cnf

 

[[email protected] ~]# 

 

在MySQL的官方文书档案,你能够看看RPM包所在的安装目录。我们运用rpm -ql
比较验证了一晃,基本都OK,不过很古怪的是,在地点那些版本中,小编从不找到/etc/my.cnf,而是/usr/my.cnf

 

MySQL 5.6

Directory

Contents of Directory

/usr/bin

Client programs and scripts

/usr/sbin

The mysqld server

/var/lib/mysql

Log files, databases

/var/lib/mysql-files

Value of secure_file_priv

/usr/share/info

MySQL manual in Info format

/usr/share/man

Unix manual pages

/usr/include/mysql

Include (header) files

/usr/lib/mysql

Libraries

/usr/share/mysql

Miscellaneous support files, including error messages, character set files, sample configuration files, SQL for database installation

/usr/share/sql-bench

Benchmarks

 

 

 

MySQL 5.7

Files or Resources

Location

Client programs and scripts

/usr/bin

mysqld server

/usr/sbin

Configuration file

/etc/my.cnf

Data directory

/var/lib/mysql

Error log file

For RHEL, Oracle Linux, CentOS or Fedora platforms: /var/log/mysqld.log

For SLES: /var/log/mysql/mysqld.log

Value of secure_file_priv

/var/lib/mysql-files

System V init script

For RHEL, Oracle Linux, CentOS or Fedora platforms: /etc/init.d/mysqld

For SLES: /etc/init.d/mysql

Systemd service

For RHEL, Oracle Linux, CentOS or Fedora platforms: mysqld

For SLES: mysql

Pid file

/var/run/mysql/mysqld.pid

Socket

/var/lib/mysql/mysql.sock

Keyring directory

/var/lib/mysql-keyring

Unix manual pages

/usr/share/man

Include (header) files

/usr/include/mysql

Libraries

/usr/lib/mysql

Miscellaneous support files (for example, error messages, and character set files)

/usr/share/mysql

 

 

此外一台测试服务器,使用yum安装了mysql-community-server-5.七.1捌,测试表明开掘又是平常。
一时不知底那个细节难点。

 

 

Linux下何以查看使用YUM安装过的包的设置路线呢?
在搞了解那些主题材料前,大家先来询问一下YUM。…

际遇那一个错误是因为尚未安装MySQL-shared-compat组件,安装了MySQL-shared-compat-advanced-5.陆.20-一.rhel五.x86_64.rpm后,然后使用yum
install perl-DBD-MySQL就不会遇上conflict with file的错误

如上所示,表明安装了MySQL
伍.6.二三以此本子的client、server、devel五个零件。

 

 

首先通过进程查看是还是不是有MySQL的劳动的情景,
如下所示,MySQL服务是开发银行的。

/usr/bin/mysql_convert_table_format

  file
/usr/bin/mysql from install of mysql-5.0.77-4.el5_6.6.x86_64 conflicts
with file from package
MySQL-client-advanced-5.6.20-1.rhel5.x86_64

布局文件一般有/etc/my.cnf
或/etc/init.d/mysql.server,视具体安装配置情状而定。

 

 

陆:删除mysql用户及用户组

/usr/bin/mysqlbug

 

②:
卸载前关闭MySQL服务

/usr/bin/mysql_zap

 

[root@DB-Server init.d]# whereis mysql

 

mysql: /usr/local/mysql

 

[root@DB-Server init.d]# find / -name mysql

 

/var/spool/mail/mysql

 

/usr/local/mysql-5.7.5-m15-linux-glibc2.5-x86_64/include/mysql

 

/usr/local/mysql-5.7.5-m15-linux-glibc2.5-x86_64/bin/mysql

 

/usr/local/mysql-5.7.5-m15-linux-glibc2.5-x86_64/data/mysql

 

/usr/local/mysql

 

 

[root@DB-Server tmp]# rpm -ivh percona-xtrabackup-24-2.4.6-2.el5.x86_64.rpm 

warning: percona-xtrabackup-24-2.4.6-2.el5.x86_64.rpm: Header V4 DSA signature: NOKEY, key ID cd2efd2a

error: Failed dependencies:

        libev.so.4()(64bit) is needed by percona-xtrabackup-24-2.4.6-2.el5.x86_64

        perl(DBD::mysql) is needed by percona-xtrabackup-24-2.4.6-2.el5.x86_64

三:
删除一些陈设文件

那正是说大家得以接纳“rpm
-ql 
包名”来查阅具体的安装路线。如下所示:

图片 1

二进制包/源码安装格局的MySQL卸载

/usr/share/man/man1/msql2mysql.1.gz

 

 

/etc/init.d/mysql

 

怎么着在Linux下卸载MySQL数据库呢?
上面总计、整理了瞬间Linux平台下卸载MySQL的方法。
MySQL的装置首要有三种艺术:二进制包安装(Using Generic
Binaries)、RPM包安装、源码安装。对应分裂的安装格局,卸载的步调有个别差别。小说中如有不足或不规则的地点,敬请提议或补充!

 

  file
/usr/bin/mysqlaccess from install of mysql-5.0.77-4.el5_6.6.x86_64
conflicts with file from package
MySQL-client-advanced-5.6.20-1.rhel5.x86_64

 

 

安装
perl-DBD-MySQL时,就能够高出海高校量像样上边错误

2.2 方法2

 

在Red
Hat Enterprise Linux Server release 五.柒(Tikanga)上利用RPM形式安装Percona Xtrabackup
二.四.陆时遇上了一些难点,特意计算在此。

[root@DB-Server init.d]# ./mysql status

 MySQL running (26215)[  OK  ]

[root@DB-Server init.d]# ./mysql stop

 Shutting down MySQL..[  OK  ]

[root@DB-Server init.d]# ./mysql status

 MySQL is not running[FAILED]

[root@DB-Server init.d]# 

 

 

[root@DB-Server
init.d]# whereis mysql

/usr/bin/mysqldump

 

 

图片 2

设置相关依赖组件时,遇到conflict
with file的失实,如上截图所示,然后安装Percona Xtrabackup
贰.四.六是就能够碰着下边错误:

[root@DB-Server
init.d]# rpm -qa | grep -i mysql

/usr/share/man/man1/mysql_config_editor.1.gz

  file
/usr/bin/mysql_waitpid from install of mysql-5.0.77-4.el5_6.6.x86_64
conflicts with file from package
MySQL-client-advanced-5.6.20-1.rhel5.x86_64

[root@DB-Server init.d]# rm -rf /usr/local/mysql-5.7.5-m15-linux-glibc2.5-x86_64/

 

[root@DB-Server init.d]# rm -rf /usr/local/

 

[root@DB-Server init.d]# rm -rf /var/spool/mail/mysql

 

[root@DB-Server init.d]# 

 

MySQL
5.6

[root@DB-Server
tmp]#yum -y install perl perl-devel libaio libaio-devel
perl-Time-HiRes perl-DBD-MySQL

 

图片 3

[root@DB-Server tmp]# rpm -qa | grep -i mysql

MySQL-server-advanced-5.6.20-1.rhel5

MySQL-client-advanced-5.6.20-1.rhel5

[root@DB-Server tmp]# rpm -ivh MySQL-shared-compat-advanced-5.6.20-1.rhel5.x86_64.rpm 

Preparing...                ########################################### [100%]

   1:MySQL-shared-compat-adv########################################### [100%]

[root@DB-Server tmp]# yum install perl-DBD-MySQL

[root@DB-Server tmp]# rpm -ivh percona-xtrabackup-24-2.4.6-2.el5.x86_64.rpm 

warning: percona-xtrabackup-24-2.4.6-2.el5.x86_64.rpm: Header V4 DSA signature: NOKEY, key ID cd2efd2a

Preparing...                ########################################### [100%]

   1:percona-xtrabackup-24  ########################################### [100%]

[root@DB-Server tmp]# 

[root@DB-Server
init.d]# rpm -qa | grep -i mysql

图片 4

如上所示,既然缺少组件,那么安装libev.x八陆_6四,
如下所示,本地yum源安装libev.so.四战败,只可以从网络下载libev-4.一伍-1.el五.rf.x捌陆_64.rpm,网址为

图片 5

 

 

图片 6

/usr/bin/mysql

  file
/usr/bin/mysql_find_rows from install of
mysql-5.0.77-4.el5_6.6.x86_64 conflicts with file from package
MySQL-client-advanced-5.6.20-1.rhel5.x86_64

[root@DB-Server init.d]# 

[root@DB-Server init.d]# rpm -ev MySQL-devel-5.6.23-1.linux_glibc2.5

[root@DB-Server init.d]# rpm -ev MySQL-server-5.6.23-1.linux_glibc2.5

You have new mail in /var/spool/mail/root

[root@DB-Server init.d]# rpm -ev MySQL-client-5.6.23-1.linux_glibc2.5

[root@DB-Server init.d]#

/usr/share/man/man1/mysql.1.gz

[root@DB-Server tmp]# yum -y install libev.x86_64

Loaded plugins: product-id, security, subscription-manager

Updating Red Hat repositories.

Setting up Install Process

No package libev.x86_64 available.

Nothing to do

 

 

[root@DB-Server tmp]# rpm -ivh libev-4.15-1.el5.rf.x86_64.rpm 

warning: libev-4.15-1.el5.rf.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6

Preparing...                ########################################### [100%]

   1:libev                  ########################################### [100%]

[root@DB-Server tmp]# yum list | grep "perl-DBD-MySQL"

perl-DBD-MySQL.x86_64                      3.0007-2.el5                media   

[root@DB-Server tmp]# yum install perl-DBD-MySQL

图片 7

/usr/bin/innochecksum

  file
/usr/bin/msql2mysql from install of mysql-5.0.77-4.el5_6.6.x86_64
conflicts with file from package
MySQL-client-advanced-5.6.20-1.rhel5.x86_64

图片 8

相关文章

发表评论

电子邮件地址不会被公开。 必填项已用*标注

网站地图xml地图