Detailed explanation of installing and completely uninstalling mysql with apt-get under Ubuntu

Detailed explanation of installing and completely uninstalling mysql with apt-get under Ubuntu

1. Install mysql:

udo apt-get install mysql-server
udo apt-get install mysql-client
udo apt-get install php5-mysql (used to connect php and mysql)

Check if mysql is running

aux | grep mysql

Startup Command

/etc/init.d/mysql start

2. Delete mysql

Execute the following commands in order

udo apt-get autoremove --purge mysql-server-5.0
udo apt-get remove mysql-server
udo apt-get autoremove mysql-server
udo apt-get remove mysql-common

Clean up residual data

dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P

Summarize

The above is the detailed introduction of how to install and completely uninstall MySQL using apt-get under Ubuntu. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

You may also be interested in:
  • How to install and uninstall MySQL 5.7.11 on Mac
  • How to install and uninstall MySQL service under Windows (MySQL 5.6 zip decompression version installation tutorial)
  • MySQL uninstall and install graphic tutorial under Linux
  • Installation and uninstallation of MySQL 5.7 decompressed version and summary of common problems
  • Ubuntu 16.04.1 MySQL installation and uninstallation graphic tutorial
  • Detailed tutorial on MySql installation and uninstallation
  • If MYSQL is not completely uninstalled, its installation will fail.
  • Detailed installation and uninstallation tutorial for MySQL 8.0.12
  • Complete step-by-step record of MySQL 8.0.26 installation and uninstallation

<<:  Docker installs the official Redis image and enables password authentication

>>:  How to use CocosCreator object pool

Recommend

How to design a web page? How to create a web page?

When it comes to understanding web design, many p...

Detailed explanation of how to use $props, $attrs and $listeners in Vue

Table of contents background 1. Document Descript...

Teach you how to insert 1 million records into MySQL in 6 seconds

1. Idea It only took 6 seconds to insert 1,000,00...

Detailed steps for remote deployment of MySQL database on Linux

Linux remote deployment of MySQL database, for yo...

uniapp Sample code for implementing global sharing of WeChat mini-programs

Table of contents Create a global shared content ...

DOCTYPE Document Type Declaration (Must-Read for Web Page Lovers)

DOCTYPE DECLARATION At the top of every page you w...

MySQL controls the number of attempts to enter incorrect passwords

1. How to monitor MySQL deadlocks in production e...

How to modify the default storage engine in MySQL

mysql storage engine: The MySQL server adopts a m...

Extract specific file paths in folders based on Linux commands

Recently, there is a need to automatically search...

Problems with creating placeholders for HTML selection boxes

I'm using a placeholder in a text input and i...

MySQL uses aggregate functions to query a single table

Aggregate functions Acts on a set of data and ret...

JavaScript to implement a simple clock

This article example shares the specific code for...

MySQL InnoDB tablespace encryption example detailed explanation

Preface Starting from MySQL 5.7.11, MySQL support...

Universal solution for MySQL failure to start under Windows system

MySQL startup error Before installing MySQL on Wi...

SQL implementation LeetCode (176. Second highest salary)

[LeetCode] 176. Second Highest Salary Write a SQL...