•  Home
  •  Dashboard
  •  Company
    • About Us
    • Blog
    • Careers
    • Contact Us
    • Data Centers
    • Looking Glass
    • Network
    • Reseller
  •  Hosting Services
    • Backup
    • Content Delivery Network
    • Colocation Hosting
    • Dedicated Hosting
    • DDoS Mitigation
    • IP Transit
    • Private Cloud
    • Wavelength
  •  Solutions
    • Ecommerce
    • Finance
    • Gaming
    • Hosting
    • Management
    • Security
    • System Integrator
  •  Support
    • Community
    • Knowledge Base
    • Open A Ticket
  •  USA & Canada: 800-933-1517
  •  International: 626-549-2801
  •  Email: sales@psychz.net
  • Services
    • Dedicated Servers
    • Colocation
    • Private Cloud
    • DDos Protection
    • IP Transit
    • CDN
    • Backup
  • Solutions
    • Ecommerce
    • Security
    • Gaming
    • Hosting
    • Management
    • Finance
    • System Integrator
  • Dashboard

Ubuntu remove mysql

  • Home
  • Client
  • Knowledgebase
  • Linux
  • Ubuntu remove mysql

Table Of Content

Related Articles

  • Linux File Permissions Cheat Sheet
  • The ELK Stack: Elasticsearch, Logstash, Kibana.
  • How to install Node.js on AlmaLinux 8
  • Firewalld commands for CentOS 7 and CentOS 8
  • Managing systemd services and units using systemctl commands
  • How to check RAM for error using Ubuntu Live CD?
  • How to remotely connect to a Linux machine using a smartphone?
  • Unable to Access The Server Via SSH
  • How to clone and migrate a Linux hard drive to another server?
  • SCP Command Syntax Examples in Linux
  • Whitelisting Edge Server IPs
  • traceroute in Linux
  • ssh host key verification failed error
  • logrotate
  • How to rsync two directories
  • setup hourly crontab
  • Views: (11529)
  • Votes: (0)
Was this article helpful?
VOTE

Ubuntu remove mysql

Publisher: Psychz Networks,  October 04,2015

There are times when we need to remove a version of mysql to replace it with another, or need to remove a conflicting copy of the same program.

The Ubuntu dpkg-query command can be used to pull up information pertaining to installed packages. Here's an outpout of all of the installated packages of mysql.

root@localhost:~# dpkg --list |grep mysql

ii  libdbd-mysql-perl                   4.025-1                       amd64        Perl5 database interface to the MySQL database
ii  libmysqlclient18:amd64              5.5.44-0ubuntu0.14.04.1       amd64        MySQL database client library
ii  mysql-client-core-5.6               5.6.19-0ubuntu0.14.04.1       amd64        MySQL database core client binaries
ii  mysql-common                        5.5.44-0ubuntu0.14.04.1       all          MySQL database common files, e.g. /etc/mysql/my.cnf
rc  mysql-server-5.5                    5.5.44-0ubuntu0.14.04.1       amd64        MySQL database server binaries and system database setup
ii  mysql-server-core-5.5               5.5.44-0ubuntu0.14.04.1       amd64        MySQL database server binaries

As you can see here we have two copies of the MYSQL 5.5. and 5.6,  that can potentially cause conflicts amongst LAMP stack applications. To remove the version of mysql-5.6 that is conflicting with your programs we'll run the following command.

root@localhost:~#  dpkg -r mysql-client-core-5.6

(Reading database ... 54555 files and directories currently installed.)
Removing mysql-client-core-5.6 (5.6.19-0ubuntu0.14.04.1) ...
Processing triggers for man-db (2.6.7.1-1) ...

 

Now lets check again if we remove the correct file.

 

root@localhost:~# dpkg --list | grep mysql
ii  libdbd-mysql-perl                   4.025-1                       amd64        Perl5 database interface to the MySQL database
ii  libmysqlclient18:amd64              5.5.44-0ubuntu0.14.04.1       amd64        MySQL database client library
ii  mysql-common                        5.5.44-0ubuntu0.14.04.1       all          MySQL database common files, e.g. /etc/mysql/my.cnf
rc  mysql-server-5.5                    5.5.44-0ubuntu0.14.04.1       amd64        MySQL database server binaries and system database setup
ii  mysql-server-core-5.5               5.5.44-0ubuntu0.14.04.1       amd64        MySQL database server binaries

 

Flags to know when using the DPKG command.

  • u - unknown
  • i - install
  • r - remove/deinstall
  • p - urge (remove including config files)
  • h - hold

Now you have all the tools to remove mysql or any other program on a debian/Ubuntu machine.

Hosting Services
  • Dedicated Hosting
  • Colocation Hosting
  • Backup
  • IP Transit
  • DDoS Mitigation
Support
  • Portal Login
  • Knowledgebase
  • Community
Company
  • About Us
  • Contact Us
  • Network
  • Data Centers
  • Looking Glass
  • Affiliates
  • Reseller
  • Blog
Policies
  • Privacy Policy
  • Acceptable Usage Policy
  • Terms and Conditions
  • Service Level Agreement
Company
  • Psychz Networks,
    A Profuse Solutions Company
    611 Wilshire Blvd #300
    Los Angeles,California 90017
    USA
  • US/Canada: 800-933-1517
  • International: 626-549-2801
Subscribe to Our Mailing List
* indicates required
Copyright © 2023 Psychz Networks, A Profuse Solutions Inc Company