Hướng dẫn uninstall mysql workbench ubuntu

2.4.3 Uninstalling

The procedure for uninstalling MySQL Workbench on Linux depends on the package you are using.

Note

When using apt, the official package name at dev.mysql.com is mysql-workbench-community, whereas most Linux distributions use the name mysql-workbench. Adjust the following commands accordingly.

Uninstalling DEB Packages

To uninstall a Debian package, use the following:

$> sudo apt-get remove mysql-workbench-community

Or, alternatively:

$> sudo dpkg -r mysql-workbench-community

This command does not remove the configuration files. If you wish to also remove the configuration files, use this command:

$> sudo dpkg --purge mysql-workbench-community

Uninstalling RPM Packages

Note

When using yum, the official package name at dev.mysql.com is mysql-workbench-community, whereas most Linux distributions use the name mysql-workbench. Adjust the following commands accordingly.

To uninstall an RPM package, use this command:

$> sudo yum remove mysql-workbench-community

Or, alternatively:

$> sudo rpm -e mysql-workbench-community

This command does not remove the configuration files.

What Is Not Removed

By default, uninstalling MySQL Workbench does not remove your Workbench configuration directory. This directory includes your MySQL connections, configuration settings, cache files, SQL snippets and history, logs, custom modules, and more. These files are stored under your user's .mysql/workbench/ directory.

Note

By default, the Workbench configuration directory is ~username/mysql/workbench/ where "~username" is the path to your user's home directory.

Also, uninstalling Workbench does not remove the .mysqlworkbench schema that Workbench creates when sharing SQL snippets across a MySQL connection. For additional information about shared snippets, see Section 8.1.5, “SQL Additions - Snippets Tab”.


2.3.3 Uninstalling

The method for uninstalling MySQL Workbench depends on how you installed MySQL Workbench.

Removing MySQL Workbench After Installation Using the Installer Package

To uninstall MySQL Workbench, do one of the following:

  • From , select and Apps.

  • Search for Add or Remove Programs.

Select the MySQL Workbench entry and click Uninstall to remove MySQL Workbench.

Note

If you installed MySQL Workbench using the Installer package, it is not possible to remove MySQL Workbench from the command line. Although you can remove some of the components manually, there is no command-line option for removing MySQL Workbench.

Removing the MySQL Workbench directory manually does not remove all of the files belonging to MySQL Workbench.

Removing MySQL Workbench After Installation from MySQL Installer

  1. From the MySQL Installer dashboard, click Remove to open the Select Products to Remove page.

  2. Select MySQL Workbench (the status changes to Ready to remove) and click Next.

  3. Click Execute to uninstall all of the selected products.

What Is Not Removed

Uninstalling MySQL Workbench does not remove your Workbench configuration directory. This directory includes your MySQL connections, configuration settings, cache files, SQL snippets and history, logs, custom modules, and more. These files are stored under your user's %AppData% directory.

Note

By default, the Workbench configuration directory is C:\username\AppData\Roaming\MySQL\Workbench\ and the C:\username\AppData\Roaming\ portion is the value of your %AppData% Windows system variable.

Also, uninstalling Workbench does not remove the .mysqlworkbench schema that Workbench creates when sharing SQL snippets across a MySQL connection. For additional information about shared snippets, see Section 8.1.5, “SQL Additions - Snippets Tab”.


Theo như tiêu đề các bạn đã đọc rồi đấy, thì nội dung bài viết này sẽ chỉ bạn các bước để xoá bỏ hoàn toàn dịch vụ MySQL các phiên bản bất kì từ 5.4 trở lên trên hệ thống Ubuntu.

Các bạn chỉ cần làm theo các bước sau thì việc gỡ cài đặt sẽ hoàn tất và sạch sẽ, điều này rất có ích nếu bạn muốn cài đặt lại dịch vụ MySQL với phiên bản khác nhưng sẽ chẳng mai gặp các lỗi bất kì và cực kì đau đầu. Thế nên hãy luôn gỡ sạch sẽ dịch vụ MySQL như sau.

Contents

  • Bước 1: Dừng dịch vụ mysql lại.
  • Bước 2 : Kill sạch các tiến trình liên quan đến mysql
  • Bước 3 : Tiến hành gỡ bỏ gói cài đặt mysql và dọn dẹp các gói cài đặt liên kết khác.
  • Bước 4 : Xoá user và group mysql cùng directory home nếu có của user đó.
  • Bước 5 : xoá các file và thư mục liên quan MySQL còn sót lại

# sudo service mysql stop

Bước 2 : Kill sạch các tiến trình liên quan đến mysql

# sudo killall -KILL mysql mysqld_safe mysqld

Bước 3 : Tiến hành gỡ bỏ gói cài đặt mysql và dọn dẹp các gói cài đặt liên kết khác.

# sudo apt-get --yes purge mysql-server mysql-client mysql-common
# sudo apt-get --yes autoremove --purge
# sudo apt-get autoclean

Bước 4 : Xoá user và group mysql cùng directory home nếu có của user đó.

# sudo deluser --remove-home mysql
# sudo delgroup mysql

Bước 5 : xoá các file và thư mục liên quan MySQL còn sót lại

– Đây là một trong những phần quan trọng. Đó là không được để lại các file cấu hình hay thư mục liên quan đến dịch vụ MySQL cũ.
– Tốt nhất bạn nên xoá sạch các thư mục và file sau.

# sudo rm -rf /etc/apparmor.d/abstractions/mysql /etc/apparmor.d/cache/usr.sbin.mysqld /etc/mysql /var/lib/mysql /var/log/mysql* /var/log/upstart/mysql.log* /var/run/mysqld

 
Vậy là xong, lúc này bạn đã có thể cài đặt dịch vụ MySQL version mới.