卸载Mariadb-报错
1. rpm -qa|grep aria
MariaDB-client-10.1.22-1.x86_64
MariaDB-devel-10.1.22-1.x86_64
MariaDB-shared-10.1.22-1.x86_64
MariaDB-cracklib-password-check-10.1.22-1.x86_64
MariaDB-common-10.1.22-1.x86_64
MariaDB-server-10.1.22-1.x86_64
2. rpm -e `rpm -qa|grep aria`
redirecting to systemctl stop mysql.service
Usage:
insserv [[-r] <script>]
Options:
--remove, -r
Remove the listed scripts from all runlevels
/sbin/insserv failed, exit code 1
Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.
If you want to list systemd services use 'systemctl list-unit-files'.
To see services enabled on particular target use
'systemctl list-dependencies [target]'.
mysql 0:off 1:off 2:off 3:off 4:off 5:off 6:off
error: %preun(MariaDB-server-10.1.22-1.x86_64) scriptlet failed, exit status 1
error: MariaDB-server-10.1.22-1.x86_64: erase failed
3.查看依赖:
rpm -q -scripts MariaDB-server-10.1.22-1.x86_64
preinstall scriptlet (using /bin/sh):
# Check if we can safely upgrade. An upgrade is only safe if it's from one
# of our RPMs in the same version family.
installed=`rpm -q --whatprovides mysql-server 2> /dev/null`
if [ $? -eq 0 -a -n "$installed" ]; then
installed=`echo "$installed"|sed -n 1p`
vendor=`rpm -q --queryformat='%{VENDOR}' "$installed" 2>&1`
version=`rpm -q --queryformat='%{VERSION}' "$installed" 2>&1`
myvendor='Monty Program AB'
myversion='10.1.22'
old_family=`echo $version | sed -n -e 's,^\([1-9][0-9]*\.[0-9][0-9]*\)\..*$,\1,p'`
new_family=`echo $myversion | sed -n -e 's,^\([1-9][0-9]*\.[0-9][0-9]*\)\..*$,\1,p'`
[ -z "$vendor" ] && vendor='<unknown>'
[ -z "$old_family" ] && old_family="<unrecognized version $version>"
[ -z "$new_family" ] && new_family="<bad package specification: version $myversion>"
error_text=
if [ "$vendor" != "$myvendor" ]; then
error_text="$error_text
The current MariaDB server package is provided by a different
vendor ($vendor) than $myvendor. Some files may be installed
to different locations, including log files and the service
startup script in /etc/init.d/.
"
fi
if [ "$old_family" != "$new_family" ]; then
error_text="$error_text
Upgrading directly from MySQL $old_family to MariaDB $new_family may not
be safe in all cases. A manual dump and restore using mysqldump is
recommended. It is important to review the MariaDB manual's Upgrading
section for version-specific incompatibilities.
"
fi
if [ -n "$error_text" ]; then
cat <<HERE >&2
******************************************************************
A MySQL or MariaDB server package ($installed) is installed.
$error_text
A manual upgrade is required.
- Ensure that you have a complete, working backup of your data and my.cnf
files
- Shut down the MySQL server cleanly
- Remove the existing MySQL packages. Usually this command will
list the packages you should remove:
rpm -qa | grep -i '^mysql-'
You may choose to use 'rpm --nodeps -ev <package-name>' to remove
the package which contains the mysqlclient shared library. The
library will be reinstalled by the MariaDB-shared package.
- Install the new MariaDB packages supplied by $myvendor
- Ensure that the MariaDB server is started
- Run the 'mysql_upgrade' program
This is a brief description of the upgrade process. Important details
can be found in the MariaDB manual, in the Upgrading section.
******************************************************************
HERE
exit 1
fi
fi
postinstall scriptlet (using /bin/sh):
if [ -f /usr/lib/systemd/system/mariadb.service -a -x /usr/bin/systemctl ]; then
systemd_conf=/etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf
if [ -x /usr/bin/mariadb-service-convert -a ! -f "${systemd_conf}" ]; then
# Either fresh install or upgrade non-systemd -> systemd
mkdir -p /etc/systemd/system/mariadb.service.d
/usr/bin/mariadb-service-convert > "${systemd_conf}"
# Make sure old possibly non-systemd instance is down
if [ $1 = 2 ]; then
SYSTEMCTL_SKIP_REDIRECT=1 /etc/init.d/mysql stop >/dev/null 2>&1 || :
systemctl start mariadb >/dev/null 2>&1 || :
fi
systemctl enable mariadb.service >/dev/null 2>&1 || :
fi
fi
# Make MySQL start/shutdown automatically when the machine does it.
if [ $1 = 1 ] ; then
if [ -x /usr/bin/systemctl ] ; then
/usr/bin/systemctl daemon-reload >/dev/null 2>&1
fi
if [ -x /sbin/chkconfig ] ; then
/sbin/chkconfig --add mysql
fi
basedir=`/usr/bin/my_print_defaults --mysqld|sed -ne 's/^--basedir=//p'|tail -1`
if [ -z "$basedir" ] ; then
basedir=/usr
fi
datadir=`/usr/bin/my_print_defaults --mysqld|sed -ne 's/^--datadir=//p'|tail -1`
if [ -z "$datadir" ] ; then
datadir=/var/lib/mysql
else
# datadir may be relative to a basedir!
if ! expr $datadir : / > /dev/null; then
datadir=$basedir/$datadir
fi
fi
# Create a MySQL user and group. Do not report any problems if it already
# exists.
groupadd -r mysql 2> /dev/null || true
useradd -M -r --home $datadir --shell /sbin/nologin --comment "MySQL server" --gid mysql mysql 2> /dev/null || true
# The user may already exist, make sure it has the proper group nevertheless (BUG#12823)
usermod --gid mysql mysql 2> /dev/null || true
# Temporary Workaround for MDEV-11386 - will be corrected in Advance Toolchain 10.0-3 and 8.0-8
for ldconfig in /opt/at*/sbin/ldconfig; do
test -x $ldconfig && $ldconfig
done
# Change permissions so that the user that will run the MySQL daemon
# owns all database files.
chown -R mysql:mysql $datadir
if [ ! -e $datadir/mysql ]; then
# Create data directory
mkdir -p $datadir/{mysql,test}
# Initiate databases
/usr/bin/mysql_install_db --rpm --user=mysql
fi
# Change permissions again to fix any new files.
chown -R mysql:mysql $datadir
# Fix permissions for the permission database so that only the user
# can read them.
chmod -R og-rw $datadir/mysql
fi
# install SELinux files - but don't override existing ones
SETARGETDIR=/etc/selinux/targeted/src/policy
SEDOMPROG=$SETARGETDIR/domains/program
SECONPROG=$SETARGETDIR/file_contexts/program
if [ -x /usr/sbin/semodule ] ; then
/usr/sbin/semodule -i /usr/share/mysql/policy/selinux/mariadb.pp
fi
if [ -x sbin/restorecon ] ; then
sbin/restorecon -R var/lib/mysql
fi
preuninstall scriptlet (using /bin/sh):
if [ $1 = 0 ] ; then
# Stop MySQL before uninstalling it
if [ -x /etc/init.d/mysql ] ; then
/etc/init.d/mysql stop > /dev/null
fi
# Don't start it automatically anymore
if [ -x /sbin/chkconfig ] ; then
/sbin/chkconfig --del mysql
fi
fi
# We do not remove the mysql user since it may still own a lot of
# database files.
postuninstall scriptlet (using /bin/sh):
if [ $1 -ge 1 ]; then
if [ -x /etc/init.d/mysql ] ; then
# only restart the server if it was alredy running
if /etc/init.d/mysql status > /dev/null 2>&1; then
/etc/init.d/mysql restart
fi
fi
fi
if [ $1 = 0 ] ; then
if [ -x /usr/bin/systemctl ] ; then
/usr/bin/systemctl daemon-reload > /dev/null 2>&1
fi
fi
4.最后一步,删除MariaDB-server:
rpm -e --noscripts MariaDB-server-10.1.22-1.x86_64
参考:http://blog.chinaunix.net/uid-631981-id-3787314.html
卸载Mariadb-报错的更多相关文章
- 安装mariadb报错: Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
卸载和删除都使用过了,没有起到效果,然后用了如下的方案,进行解决: CentOS 从 Yum 源安装配置 Mariadb 2017.03.01 WangYan 学习笔记 热度 7℃ 一.安装 Mar ...
- MariaDB报错Plugin 'InnoDB' init function returned error.解决方案
重新安装MariaDB后,服务一直启动不起来,查看日志有以下错误: InnoDB: No valid checkpoint found. InnoDB: If you are attempting d ...
- python连接mariadb报错解决1045, "Access denied for user 'root'@'192.168.0.50' (using password: YES)
[root@localhost ~]# python Python 2.7.5 (default, Apr 11 2018, 07:36:10) [GCC 4.8.5 20150623 (Red Ha ...
- CentOS7.3yum安装MariaDB报错[Errno 256]
在yum安装MariaDB时出现下面这个错误提示,然后着手排查,先检查了/etc/yum.repo.d/下的配置文件,没有错误. failure: repodata/repomd.xml from m ...
- Sql Server 2008卸载后再次安装一直报错
sql server 2008卸载之后再次安装一直报错问题. 第一:由于上一次的卸载不干净,可参照百度完全卸载sql server2008 的方式 1. 用WindowsInstaller删除所有与S ...
- Mariadb 10.1 joiner节点加入报错WSREP: Failed to prepare for incremental state transfer
Mariadb 10.1 galera cluster 集群joiner 节点加入集群 会出现这种报错,导致mysql一直点点点,这里我贴出报错.2016年04月19日13:34:58 2016-04 ...
- MySQL or MariaDB 错误解决方法之报错代码1045
phpMyAdmin登录报错:mysqli_real_connect(): (28000/1045): Access denied for user 'root'@'localhost' (using ...
- mariadb启动报错:[ERROR] Can't start server : Bind on unix socket: Permission denied
今天mariadb总是启动不了,对于我来说是不能忍受的.然后前往日志文件查看报错信息,提示如下: 出错信息一共就这三行,没有报其他的错误.那只能从红色方框的地方开始入手了. 首先是百度去搜索原因是什么 ...
- python的卸载方式和运行yum报错:No module named yum
公司测试机环境不知道给我卸了什么包,导致yum运行报错状况: 系统版本:Red Hat Enterprise Linux Server release 6.2 (Santiago) 内核版本:2.6. ...
- vs2010一运行就报错deven.exe assert failure 解决方法,卸载系统中.netFramework最新版本的(简体中文)
vs2010一运行就报错deven.exe assert failure 解决方法,卸载系统中.netFramework最新版本的(简体中文)
随机推荐
- #pragma 处理警告 clang diagnostic 的使用
首先#pragma在本质上是声明,常用的功能就是注释,尤其是给Code分段注释:而且它还有另一个强大的功能是处理编译器警告,但却没有上一个功能用的那么多. clang diagnostic 是#pra ...
- ScheduledThreadPoolExecutor
java提供了方便的定时器功能,代码示例: public class ScheduledThreadPool_Test { static class Command implements Runnab ...
- weblogic安装教程(以weblogic 11g为例)
1.下载jdk和weblogic安装介质 一般的搭配是jdk1.5+weblogic92.jdk1.6+weblogic11g(weblogic10.3.6) jdk历史版本下载链接:http://w ...
- asp.net mvc中动作方法的重定向
简单介绍一下mvc控制器下怎样重定向的其它页面 1.方式1:Response.Redirect重定向 //Response.Redirect方式跳转 Response.Redirect("~ ...
- hdu 2065 "红色病毒"问题(快速幂求模)
n=1 --> ans = 2 = 1*2 = 2^0(2^0+1) n=2 --> ans = 6 = 2*3 = 2^1(2^1+1) n=3 --> ans = 20 ...
- IOS应用内支付IAP从零开始详解
前言 什么是IAP,即in-app-purchase 这几天一直在搞ios的应用内购,查了很多博客,发现几乎没有一篇博客可以完整的概括出所有的点,为了防止大伙多次查阅资料,所以写了这一篇博客,希望大家 ...
- Linux系统默默改变了人类世界的生活方式
你知道操作系统都有些什么吗?Windows啊.这是我在上大学之前的问答,我当时认为只一种叫做Windows的操作系统,可是我错了,当我上大学以后,作为计算机专业的一名学生的时候我第一次接触到了除Win ...
- 修改placeholder的值---input-placeholder
input-placeholder .box::input-placeholder 目前所有的浏览器都要加前缀 .box::-webkit-input-placeholder{ color: agba ...
- 一次jenkins的错误
描述:我svn修改了一个类的名称,然后构建到jenkins发现,原来的类还在然后和现在的类一起冲突 解决:清理工作空间 然后重新部署即可.
- python 数据如何保存到excel中--xlwt
第一步:下载xlwt 首先要下载xlwt,(前提是你已经安装好了Python) 下载地址: https://pypi.python.org/pypi/xlwt/ 下载第二个 第二步:安装xl ...