Removing MySQL Server

WARNING: Removing MySQL Server will remove your KDE Desktop Environment and a number of KDE applications.

Removing MySQL Server ensures that, the existing files or services installed by it, will not create conflict when we install MySQL Server from the source code.

The following procedure will completely remove MySQL Server from our system.
1) Removing MySQL Server Packages
2) Removing MySQL User and Group

 

1) Removing MySQL Server Packages
Let us get a list of all installed packages with mysql in their name.

# yum list installed *mysql*
OPTIONS EXPLAINED

list
Is used to list various information about available packages; more complete details are available in the List Options section.

installed
List the packages installed on the system specified by args. If an argument does not match the name of an available package, it is assumed to be a shell-style glob and any matches are printed.

NOTE: The escape character '' prevents our shell from parsing '*'. So that yum gets the global expression we intended, which is *mysql*.

We will get a list of all installed packages having mysql in their name.
NOTE: Repository information has been stripped from the below output.

dovecot-mysql.i686		1:2.0.9-2.el6_1.1
libdbi-dbd-mysql.i686		0.8.3-5.1.el6
mysql-bench.i686		5.1.61-4.el6
mysql-connector-java.noarch	1:5.1.17-6.el6
mysql-connector-odbc.i686	5.1.5r1144-7.el6
mysql-devel.i686		5.1.61-4.el6
mysql.i686			5.1.61-4.el6
mysql-libs.i686			5.1.61-4.el6
MySQL-python.i686		1.2.3-0.3.c1.1.el6
mysql-server.i686		5.1.61-4.el6
mysql-test.i686			5.1.61-4.el6
perl-DBD-MySQL.i686		4.013-3.el6
qt3-MySQL.i686			3.3.8b-30.el6
qt-mysql.i686			1:4.6.2-24.el6
rsyslog-mysql.i686		5.8.10-2.el6

 

We can get a description of each of the above package by using the yum info command. For example, to get information on mysql.i686 package, execute the following command. The architecture spec i686 need not be specified.

# yum info mysql
OPTIONS EXPLAINED

info
Is used to list a description and summary information about available packages; takes the same arguments as in the List Options section.

Also we can get a list of all files with their locations, installed by a specific package, by using the rpm -ql command. For example, to get information on mysql.i686 package, execute the following command. The architecture spec i686 need not be specified.

# rpm -ql mysql
OPTIONS EXPLAINED

-q
query

-l
list files in package

The yum descriptions for each package is given below. It is for us to understand what each packages are, so that we can decide which of them to remove.

dovecot-mysql.i686
This package provides the MySQL back end for dovecot-auth etc.

libdbi-dbd-mysql.i686
This plugin provides connectivity to MySQL database servers through the libdbi database independent abstraction layer. Switching a program's plugin does not require recompilation or rewriting source code.

mysql-bench.i686
MySQL is a multi-user, multi-threaded SQL database server. This package contains benchmark scripts and data for use when benchmarking MySQL.

mysql-connector-java.noarch
MySQL Connector/J is a native Java driver that converts JDBC (Java Database Connectivity) calls into the network protocol used by the MySQL database. It lets developers working with the Java programming language easily build programs and applets that interact with MySQL and connect all corporate data, even in a heterogeneous environment. MySQL Connector/J is a Type IV JDBC driver and has a complete JDBC feature set that supports the capabilities of MySQL.

mysql-connector-odbc.i686
An ODBC (rev 3) driver for MySQL, for use with unixODBC.

mysql-devel.i686
MySQL is a multi-user, multi-threaded SQL database server. This package contains the libraries and header files that are needed for developing MySQL client applications.

mysql.i686
MySQL is a multi-user, multi-threaded SQL database server. MySQL is a client/server implementation consisting of a server daemon (mysqld) and many different client programs and libraries. The base package contains the standard MySQL client programs and generic MySQL files.

mysql-libs.i686
The mysql-libs package provides the essential shared libraries for any MySQL client program or interface. You will need to install this package to use any other MySQL package or any clients that need to connect to a MySQL server.

MySQL-python.i686
Python interface to MySQL.
MySQLdb is an interface to the popular MySQL database server for Python.
The design goals are:
- Compliance with Python database API version 2.0
- Thread-safety
- Thread-friendliness (threads will not block each other)
- Compatibility with MySQL 3.23 and up
This module should be mostly compatible with an older interface written by Joe Skinner and others. However, the older version is
a) not thread-friendly,
b) written for MySQL 3.21,
c) apparently not actively maintained. No code from that version is used in MySQLdb.

mysql-server.i686
MySQL is a multi-user, multi-threaded SQL database server. MySQL is a client/server implementation consisting of a server daemon (mysqld) and many different client programs and libraries. This package contains the MySQL server and some accompanying files and directories.

mysql-test.i686
MySQL is a multi-user, multi-threaded SQL database server. This package contains the regression test suite distributed with the MySQL sources

perl-DBD-MySQL.i686
An implementation of DBI for MySQL for Perl

qt3-MySQL.i686
MySQL driver for Qt 3's SQL classes (QSQL)

qt-mysql.i686
MySQL driver for Qt's SQL classes.

rsyslog-mysql.i686
The rsyslog-mysql package contains a dynamic shared object that will add MySQL database support to rsyslog.

 

For removing MySQL Server, we can ignore the packages dovecot-mysql.i686, libdbi-dbd-mysql.i686, MySQL-python.i686, perl-DBD-MySQL.i686, qt3-MySQL.i686, qt-mysql.i686, rsyslog-mysql.i686 and remove rest of the packages. In the terminal, execute the following command.

# yum remove mysql mysql-bench mysql-devel mysql-libs mysql-server mysql-test mysql-connector-java mysql-connector-odbc
OPTIONS EXPLAINED

remove [ARGS]
Are used to remove the specified packages from the system as well as removing any packages which depend on the  package  being  removed. remove operates on groups, files, provides and filelists just like the "install" command.(See Specifying package names for more information)

We will get a detailed list of all packages along with their dependencies, ready to be removed. There will be also a [y/N] prompt, asking permission to continue.
NOTE: Repository information has been stripped from the below output.

========================================================================================
Package					Arch	Version				Size
========================================================================================
Removing:
 mysql					i686	5.1.61-4.el6			2.3 M
 mysql-bench				i686	5.1.61-4.el6			2.6 M
 mysql-connector-java			noarch	1:5.1.17-6.el6			2.8 M
 mysql-connector-odbc			i686	5.1.5r1144-7.el6		328 k
 mysql-devel				i686	5.1.61-4.el6			387 k
 mysql-libs				i686	5.1.61-4.el6			3.9 M
 mysql-server				i686	5.1.61-4.el6			24 M
 mysql-test				i686	5.1.61-4.el6			99 M
Removing for dependencies:
 MySQL-python				i686	1.2.3-0.3.c1.1.el6		239 k
 PyKDE4					i686	4.3.4-5.el6			20 M
 akonadi				i686	1.2.1-2.el6			1.7 M
 dovecot-mysql				i686	1:2.0.9-2.el6_1.1		13 k
 kcoloredit				i686	4.3.3-2.el6			517 k
 kdeaccessibility			i686	1:4.3.4-5.el6			8.1 M
 kdeaccessibility-libs			i686 	1:4.3.4-5.el6			157 k
 kdeadmin				i686	7:4.3.4-5.el6			3.1 M
 kdeartwork-screensavers		i686	4.3.4-7.el6			728 k
 kdebase				i686	6:4.3.4-5.el6			12 M
 kdebase-devel				i686	6:4.3.4-5.el6			44 k
 kdebase-libs				i686	6:4.3.4-5.el6			660 k
 kdebase-runtime			i686	4.3.4-9.el6			13 M
 kdebase-runtime-libs			i686	4.3.4-9.el6			4.0 M
 kdebase-workspace			i686	4.3.4-23.el6			25 M
 kdebase-workspace-akonadi		i686	4.3.4-23.el6			95 k
 kdebase-workspace-devel		i686	4.3.4-23.el6			618 k
 kdebase-workspace-libs			i686	4.3.4-23.el6			2.1 M
 kdebase-workspace-python-applet	i686	4.3.4-23.el6			46 k
 kdegames				i686	6:4.3.4-5.el6			64 M
 kdegames-libs				i686	6:4.3.4-5.el6			3.4 M
 kdegraphics				i686	7:4.3.4-6.el6			6.1 M
 kdegraphics-devel			i686	7:4.3.4-6.el6			322 k
 kdegraphics-libs			i686	7:4.3.4-6.el6			2.5 M
 kdelibs				i686	6:4.3.4-14.el6			41 M
 kdelibs-devel				i686	6:4.3.4-14.el6			6.6 M
 kdelibs-experimental			i686	4.3.4-3.el6			91 k
 kdemultimedia				i686	6:4.3.4-3.el6			2.4 M
 kdemultimedia-devel			i686	6:4.3.4-3.el6			37 k
 kdemultimedia-libs			i686	6:4.3.4-3.el6			780 k
 kdenetwork				i686	7:4.3.4-11.el6_0.1		18 M
 kdenetwork-devel			i686	7:4.3.4-11.el6_0.1		421 k
 kdenetwork-libs			i686	7:4.3.4-11.el6_0.1		4.9 M
 kdepim					i686	6:4.3.4-5.el6			20 M
 kdepim-devel				i686	6:4.3.4-5.el6			456 k
 kdepim-libs				i686	6:4.3.4-5.el6			20 M
 kdepim-runtime				i686	4.3.4-5.el6			2.9 M
 kdepim-runtime-libs			i686	4.3.4-5.el6			773 k
 kdepimlibs				i686	4.3.4-4.el6			6.2 M
 kdepimlibs-akonadi			i686	4.3.4-4.el6			1.2 M
 kdepimlibs-devel			i686	4.3.4-4.el6			1.8 M
 kdeplasma-addons			i686	4.3.4-5.el6			5.1 M
 kdeplasma-addons-libs			i686	4.3.4-5.el6			803 k
 kdesdk					i686	4.3.4-4.el6			19 M
 kdesdk-devel				i686	4.3.4-4.el6			562 k
 kdesdk-libs				i686	4.3.4-4.el6			785 k
 kdeutils				i686	6:4.3.4-7.el6			5.5 M
 kdeutils-libs				i686	6:4.3.4-7.el6			1.3 M
 kdm					i686	4.3.4-23.el6			2.8 M
 kiconedit				i686	4.3.3-1.el6			1.6 M
 kio_sysinfo				i686	20090930-1.el6			509 k
 kipi-plugins				i686	0.8.0-5.el6			13 M
 kipi-plugins-libs			i686	0.8.0-5.el6			133 k
 kmid					i686	2.0-0.14.20080213svn.el6	1.3 M
 konq-plugins				i686	4.3.3-5.el6			4.2 M
 kross-python				i686	4.3.4-5.el6			340 k
 ksig					i686	1.1-0.10.20080213.el6		228 k
 ksshaskpass				i686	0.5.1-4.1.el6			30 k
 libdbi-dbd-mysql			i686	0.8.3-5.1.el6			21 k
 perl-DBD-MySQL				i686	4.013-3.el6			341 k
 postfix				i686	2:2.6.6-2.2.el6_1		9.3 M
 qt-mysql				i686	1:4.6.2-24.el6			61 k
 qt3-MySQL				i686	3.3.8b-30.el6			47 k
 redland				i686	1.0.7-11.el6			611 k
 rsyslog-mysql				i686	5.8.10-2.el6			10 k
 soprano				i686	2.3.1-1.2.el6			1.9 M

Transaction Summary
========================================================================================
Remove       74 Package(s)

Installed size: 501 M
Is this ok [y/N]:

If we remove the MySQL Server packages, the dependency packages will also be removed. This will remove all 66 dependency packages, causing the Desktop Environment KDE and certain applications associated with it to vanish. That is a loss we have to take.
NOTE: The packages dovecot-mysql.i686, libdbi-dbd-mysql.i686, MySQL-python.i686, perl-DBD-MySQL.i686, qt3-MySQL.i686, qt-mysql.i686, rsyslog-mysql.i686 which we ignored are also listed as dependencies.

The yum descriptions for dependency packages are given below.

akonadi.i686
Requires an available instance of mysql server at runtime. Akonadi can spawn a per-user one automatically if the mysql-server package is installed on the machine. See also: /etc/akonadi/mysql-global.conf

dovecot-mysql.i686
This package provides the MySQL back end for dovecot-auth etc.

kcoloredit.i686
KColorEdit is a palette files editor. It can be used for editing color palettes and for color choosing and naming.

kdeaccessibility.i686
Included with this package are:
* kmag: a screen magnifier
* kmousetool: a program for people whom it hurts to click the mouse
* kmouth: program that allows people who have lost their voice
* ktts: text to speech support

kdeaccessibility-libs.i686
Runtime libraries for kdeaccessibility.

kdeadmin.i686
The kdeadmin package includes administrative tools including:
* kcron: systemsettings module for the cron task scheduler
* knetworkconf: systemsettings module for network settings
* ksystemlog: system log viewer
* kuser: user manager

kdeartwork-screensavers.i686
screensavers for KDE.

kdebase.i686
Core runtime requirements and applications for the KDE 4.

kdebase-devel.i686
Development files for kdebase.

kdebase-libs.i686
Runtime libraries for kdebase.

kdebase-runtime.i686
Core runtime for the KDE 4.

kdebase-runtime-libs.i686
Runtime libraries for kdebase-runtime.

kdebase-workspace.i686
The KDE Workspace consists of what is the desktop of the KDE Desktop Environment.
This package contains:
* khotkeys (a hotkey daemon)
* klipper (a cut & paste history utility)
* kmenuedit (the menu editor)
* krandrtray (resize and rotate X screens)
* krunner (a command run interface)
* ksysguard (a performance monitor)
* kwin (the window manager of KDE)
* kxkb (a utility to switch keyboard maps)
* plasma (the KDE desktop, panels and widgets workspace application)
* systemsettings (the configuration editor)

kdebase-workspace-akonadi.i686
Akonadi integration for KDE Workspace.

kdebase-workspace-devel.i686
Development files for kdebase-workspace.

kdebase-workspace-libs.i686
Runtime libraries for kdebase-workspace.

kdebase-workspace-python-applet.i686
Plasma widget in Python.

kdegames.i686
Games for KDE 4, including:
* bomber
* bovo
* kapman
* katomic
* kblackbox
* kblocks
* kbounce
* kbreakout
* kdiamond
* kfourinline
* kgoldrunner
* killbots
* kiriki
* kjumpingcube
* klines
* kmahjongg
* kmines
* knetwalk
* kolf
* kollision
* konquest
* kpat
* kreversi
* ksame
* kshisen
* ksirk
* kspaceduel
* ksquares
* ksudoku
* ktuberling
* kubrick
* lskat

kdegames-libs.i686
Runtime libraries for kdegames.

kdegraphics.i686
Graphics applications, including
* gwenview (an image viewer)
* kamera (digital camera support)
* kcolorchooser (a color chooser)
* kolourpaint4 (an easy-to-use paint program)
* kruler (screen ruler and color measurement tool)
* ksnapshot (screen capture utility)
* okular (a document viewer)

kdegraphics-devel.i686
Developer files for kdegraphics.

kdegraphics-libs.i686
Runtime libraries for kdegraphics.

kdelibs.i686
Libraries for the K Desktop Environment 4.

kdelibs-devel.i686
This package includes the header files you will need to compile applications for KDE 4.

kdelibs-experimental.i686
KDE libraries with experimental or unstable api/abi.

kdemultimedia.i686
The kdemultimedia package contains multimedia applications, including:
* dragonplayer (a simple video player)
* juk (a music manager and player)
* kmix (an audio mixer)

kdemultimedia-devel.i686
Developer files for kdemultimedia.

kdemultimedia-libs.i686
Runtime libraries for kdemultimedia.

kdenetwork.i686
Networking applications, including:
* kget: downloader manager
* kopete: chat client
* kppp: dialer and front end for pppd
* krdc: a client for Desktop Sharing and other VNC servers
* krfb: Desktop Sharing server, allow others to access your desktop via VNC

kdenetwork-devel.i686
Development files for kdenetwork.

kdenetwork-libs.i686
Runtime libraries for kdenetwork.

kdepim.i686
PIM (Personal Information Manager) applications, including:
* akregator: feed aggregator
* kmail: email client
* knode: newsreader
* knotes: sticky notes for the desktop
* kontact: integrated PIM management
* korganizer: journal, appointments, events, todos
* kpilot: HotSync® software for Palm OS® devices

kdepim-devel.i686
Development files for kdepim.
Install kdepim-devel if you want to write or compile kdepim plugins.

kdepim-libs.i686
kdepim runtime libraries.

kdepim-runtime.i686
KDE PIM Runtime Environment

kdepim-runtime-libs.i686
kdepim-runtime runtime libraries.

kdepimlibs.i686
Personal Information Management (PIM) libraries for the K Desktop Environment 4.

kdepimlibs-akonadi.i686
Akonadi runtime support for kdepimlibs.

kdepimlibs-devel.i686
Header files for developing applications using kdepimlibs.

kdeplasma-addons.i686
Additional plasmoids for KDE.

kdeplasma-addons-libs.i686
Runtime libraries for kdeplasma-addons.

kdesdk.i686
A collection of applications and tools used by developers, including:
* cervisia: a CVS frontend
* kate: advanced text editor
* kbugbuster: a tool to manage the KDE bug report system
* kcachegrind: a browser for data produced by profiling tools (e.g. cachegrind)
* kompare: diff tool
* kuiviewer: displays designer's UI files
* lokalize: computer-aided translation system focusing on productivity and performance
* umbrello: UML modeller and UML diagram tool

kdesdk-devel.i686
Files for developing applications using kdesdk.

kdesdk-libs.i686
Runtime libraries for kdesdk.

kdeutils.i686
Utilities for the K Desktop Environment.
Includes:
   * ark: tar/gzip archive manager
   * kcalc: scientific calculator
   * kcharselect: character selector
   * kdelirc: Linux Infrared Remote Control frontend
   * kdessh: ssh front end
   * kdf: view disk usage
   * kfloppy: floppy formatting tool
   * kgpg: gpg gui
   * ktimer: task scheduler
   * kwalletmanager: kde wallet management tool
   * okteta: binary/hex editor
   * superkaramba
   * sweeper: clean unwanted traces the user leaves on the system

kdeutils-libs.i686
Runtime libraries for kdeutils.

kdm.i686
KDM provides the graphical login screen, shown shortly after boot up, log out, and when user switching.

kiconedit.i686
KIconEdit is designed to help create icons for KDE using the standard icon palette.

kio_sysinfo.i686
This is a sysinfo:/ KIO slave, which shows basic system information often requested by users.

kipi-plugins.i686
This package contains plugins to use with Kipi, the KDE Image Plugin Interface.  Currently implemented plugins are:
AcquireImages      : acquire images using flat scanner
AdvancedSlideshow  : slide images with 2D and 3D effects using OpenGL
Calendar           : create calendars
FlickrExport       : export images to a remote Flickr web service
GalleryExport      : export images to a remote Gallery server
GPSSync            : geolocalize pictures
HTMLExport         : export images collections into a static XHTML page
ImageViewer        : preview images using OpenGL
JpegLossLess       : rotate/flip images without losing quality
KioExportImport    : export/imports pictures to/from accessible via KIO
MetadataEdit       : edit EXIF, IPTC and XMP metadata
PicasaWebExport    : export images to a remote Picasa web service
RemoveRedEyes      : remove red eyes on image automatically
RawConverter       : convert Raw Image to JPEG/PNG/TIFF
SendImages         : send images by e-mail
SimpleViewerExport : export images to Flash using SimpleViewer
ShwupExport        : export images to a remote Shwup web service
SmugExport         : export images to a remote SmugMug web service
FbExport           : export images to a remote Facebook web service
TimeAdjust         : adjust date and time
PrintWizard        : print images in various format

kipi-plugins-libs.i686
Runtime libraries for kipi-plugins.

kmid.i686
KMid is a midi/karaoke file player, with configurable midi mapper, real Session Management, drag & drop, customizable fonts, etc. It has a very nice interface which let you easily follow the tune while changing the color of the lyrics. It supports output through external synthesizers, AWE, FM and GUS cards. It also has a keyboard view to see the notes played by each instrument.

konq-plugins.i686
Some additional plugins that interact with konqueror
* adblock: AdBlock plugin
* akregator: Add feeds directly to akregator (kdepim is needed)
* autorefresh: Refresh websites after a specifig period
* babelfish: Translate a website with babelfish
* crashes: Crash monitor
* dirfilter: Filter the current directory in many ways
* domtreeviewer: Displays the document object model in a box
* fsview: Graphical Disk Usage for inode/directory
* imagerotation: service menu to image operations
* khtmlsettingsplugin: Enable/disable some HTML settings
* kimggalleryplugin:  Creates an HTML page with thumbnails of all the images in the current directory.
* mediarealfolder:  service menu to open a medium mountpoints
* minitools: Implement bookmarklets into konqueror
* rellinks: Allows access to relations defined in the header of a document
* searchbar: Search Bar
* sidebar: a small embedded mediaplayer, for songs/video preview
* smbmounter: provides two menus items to smbmount/umount samba shares
* uachanger: Change the user agent for websites
* validators: Website validators
* webarchiver: Web Archiver

kross-python.i686
Python plugin for the Kross archtecture in KDE4.

ksig.i686
KSig is a graphical tool for keeping track of many different email signatures. The signatures themselves can be edited through KSig's graphical user interface. A command-line interface is then available for generating random or daily signatures from a list. The command-line interface makes a suitable plugin for generating signatures in external mail clients such as KMail.

ksshaskpass.i686
A KDE version of ssh-askpass with KWallet support.
Please read /usr/share/doc/ksshaskpass-0.5.1/README.Fedora for usage instructions

libdbi-dbd-mysql.i686
This plugin provides connectivity to MySQL database servers through the libdbi database independent abstraction layer. Switching a program's plugin does not require recompilation or rewriting source code.

MySQL-python.i686
Python interface to MySQL.
MySQLdb is an interface to the popular MySQL database server for Python.
The design goals are:
- Compliance with Python database API version 2.0
- Thread-safety
- Thread-friendliness (threads will not block each other)
- Compatibility with MySQL 3.23 and up
This module should be mostly compatible with an older interface written by Joe Skinner and others. However, the older version is
a) not thread-friendly, 
b) written for MySQL 3.21, 
c) apparently not actively maintained. No code from that version is used in MySQLdb.

perl-DBD-MySQL.i686
An implementation of DBI for MySQL for Perl

PyKDE4.i686
Python bindings for KDE4.

postfix.i686
Postfix is a Mail Transport Agent (MTA), supporting LDAP, SMTP AUTH (SASL), TLS

qt-mysql.i686
MySQL driver for Qt's SQL classes.

qt3-MySQL.i686
MySQL driver for Qt 3's SQL classes (QSQL)

redland.i686
Redland is a library that provides a high-level interface for RDF (Resource Description Framework) implemented in an object-based API. It is modular and supports different RDF/XML parsers, storage mechanisms and other elements. Redland is designed for applications developers to provide RDF support in their applications as well as for RDF developers to experiment with the technology.

rsyslog-mysql.i686
The rsyslog-mysql package contains a dynamic shared object that will add MySQL database support to rsyslog.

soprano.i686
Qt wrapper API to different RDF storage solutions.

 

Type y and press Enter to continue. All the MySQL Server packages along with their dependencies will be removed from the system.

 

2) Removing MySQL User and Group
MySQL Server runs under the user and group, both named mysql. So let us remove both the user and group.
In the terminal, execute the following command.

# userdel -r mysql
OPTIONS EXPLAINED

-r
Files in the user's home directory will be removed along with the home directory itself and the user's mail spool. Files located in other file systems will have to be searched for and deleted manually.

The user and group has been removed. We will get the following error.

ERROR: userdel: mysql home directory (/var/lib/mysql) not found

The directory /var/lib/mysql/ is provided by the package mysql-server.i686. The error occurs because, the directory /var/lib/mysql/ has already been removed.

 

 

 

You may go to the following section.
Installing LAMP