Cara Uninstall MySQL

Langkah pertama yang harus anda lakukan adalah login ke cPanel. Login cPanel dapat melalui https://namadomain/cpanel, sesuai email yang dikirim dari DomaiNesia mengenai Informasi Account Hosting. Bagi anda yang belum tahu cara login cPanel, silahkan baca di Cara Mudah Login cPanel Hosting.

Cara Uninstall MySQL

2. Memilih MySQL Databases

Setelah berhasil login, silahkan ketik “mysql database” pada kolom pencarian. Untuk menghapus database MYSQL, silahkan pilih menu MySQL Databases saja agar lebih mudah.

Cara Uninstall MySQL

3. Memilih Database Yang Ingin Dihapus

Sekarang saatnya pilih database yang ingin dihapus. Pilih database yang ingin dihapus lalu klik Delete. Pastikan kamu tahu nama databasenya ya! Jangan sampai salah menghapus.

Cara Uninstall MySQL

Tunggu sebentar hingga muncul tulisan “Are you sure you wish to permanently remove the database ?”. Jika sudah, silahkan klik Delete Database. Voila! Database MySQL dari website berhasil dihapus.

Cara Uninstall MySQL

Kesimpulan

Menghapus database MySQL di Hosting sangatlah mudah. Silahkan login cPanel Hosting lalu pilih database yang ingin dihapus. Hati-hati dalam menghapus database ya! Pastikan kamu tahu bahwa yang kamu pilih tersebut adalah database yang seharusnya dihapus. Jika salah hapus, maka website lainnya akan terganggu. Jika ingin mencoba database PostgreSQL, silahkan baca Cara Membuat Database PostgreSQL ya! Salam DomaiNesia

Mutiara Auliya

Hi! I am Data Analyst and Technical Writer at DomaiNesia. I love Linux, Python, Server, WordPress, Data Analysis and Artificial Intelligence. I will help you making some technically being easy to understand :)

Learn how you may stop or start or uninstall your MySQL server - and how you may reset the root user password. For macOS & Windows!

Created by Maximilian SchwarzmüllerNovember 17, 2021

As a developer, when working with MySQL, you typically focus on database commands and queries like

mysqladmin -u root -p shutdown

1,

mysqladmin -u root -p shutdown

2 etc.

Important

You can learn all about MySQL, Postgresql and SQL in general in our SQL - The Practical Guide course!

No prior SQL knowledge is required and you will learn all about the basics, core concepts and also explore lots of advanced concepts!

But some basic database administration knowledge also comes in handy from time to time.

This article explains how to perform some of the most important, common tasks:

  • Stopping a running server: | |

  • Starting a server: | |

  • Uninstalling MySQL: | |

  • Resetting the root user password:

  • Switching to the legacy password flow:

Stopping a running server (Windows)

Important

If you started the MySQL server as a service, you can start and stop it via the Windows services tool. You find more details here.

A running MySQL server can be stopped via the

mysqladmin -u root -p shutdown

3 command which was installed on your system automatically. You can find this executable in your installation directory inside the

mysqladmin -u root -p shutdown

4 folder - for example

mysqladmin -u root -p shutdown

5.

You can optionally add the path to this

mysqladmin -u root -p shutdown

4 directory to your Windows path environment variable (see this tutorial), so that you can access the tools inside this

mysqladmin -u root -p shutdown

4 folder from anywhere on your system.

If you haven't added the

mysqladmin -u root -p shutdown

4 path to your environment variable, you have to navigate into that

mysqladmin -u root -p shutdown

4 folder via your system command prompt.

For example, this is how you could navigate into the installation path mentioned above:

cd "\Program Files\MySQL\MySQL Server 8.0\bin"

Once you navigated into that path, you can run the

mysqladmin -u root -p shutdown

3 command which is located there. Stop the running server by executing:

mysqladmin -u root -p shutdown

It will prompt you for your password and shut down the running server once you entered it.

You can then also if you want to.

Stopping a running server (macOS)

If you installed MySQL via the official installer, you should have a new entry in your "System Preferences" (at the very bottom of the overview page). If you dive into the "MySQL" option there, you can start and stop the MySQL server via this GUI.

Besides that, you can also stop the MySQL server via the macOS terminal:

sudo /usr/local/mysql/support-files/mysql.server stop

Stopping a running server (Linux)

To stop a running MySQL server on Linux, you can run the following command:

/etc/init.d/mysqld stop

Alternatively, you can also stop the running background server service by running:

service mysqld stop

That's all! You can thereafter if you want to.

Starting a server (Windows)

Important

If you want to run the MySQL server as a service, you can start and stop it via the Windows services tool. You find more details here.

A MySQL server can be started via the

sudo /usr/local/mysql/support-files/mysql.server stop

1 command which was installed on your system automatically. You can find this executable in your installation directory inside the

mysqladmin -u root -p shutdown

4 folder - for example

mysqladmin -u root -p shutdown

5.

You can optionally add the path to this

mysqladmin -u root -p shutdown

4 directory to your Windows path environment variable (see this tutorial), so that you can access the tools inside this

mysqladmin -u root -p shutdown

4 folder from anywhere on your system.

If you haven't added the

mysqladmin -u root -p shutdown

4 path to your environment variable, you have to navigate into that

mysqladmin -u root -p shutdown

4 folder via your system command prompt.

For example, this is how you could navigate into the installation path mentioned above:

cd "\Program Files\MySQL\MySQL Server 8.0\bin"

Once you navigated into that path, you can run the

sudo /usr/local/mysql/support-files/mysql.server stop

1 command which is located there. Start the running server by executing:

mysqld

It will prompt you for your password and start the server once you entered it.

Starting a server (macOS)

If you installed MySQL via the official installer, you should have a new entry in your "System Preferences" (at the very bottom of the overview page). If you dive into the "MySQL" option there, you can start and stop the MySQL server via this GUI.

Besides that, you can also start the MySQL server via the macOS terminal:

sudo /usr/local/mysql/support-files/mysql.server start

Starting a server (Linux)

To start a MySQL server on Linux, you can run the following command:

/etc/init.d/mysqld start

Alternatively, you can also start a running background server service by running:

service mysqld start

Uninstalling MySQL (Windows)

To uninstall MySQL on Windows, make sure that your first .

Once the server is stopped, you can uninstall MySQL via the Windows "Control Panel". Go to "Programs and Features" and select "MySQL" => "Uninstall".

Thereafter, to clean up any remaining data, make sure you can see hidden folders and then delete the following folders:

  • C:\Program Files\MySQL

  • C:\Program Files (x86)\MySQL

  • C:\ProgramData\MySQL

  • C:\Users<your-username>\AppData\Roaming\MySQL

Uninstalling MySQL (macOS)

If you installed MySQL via the official installer, you can uninstall it via the macOS "System Preferences". Go to the "MySQL" option and choose "Uinstall".

You also might want to get rid of all the related data - this article describes how that can be achieved.

Uninstalling MySQL (Linux)

You find detailed instructions on how to completely remove MySQL on Linux in this Stackoverflow thread.

Resetting the root user password

Forgot the password of your root database server user? No worries, you can reset it!

This article from the official documentation describes in detail, how you may reset your password on different systems.

Switching to the legacy password flow

For some clients (e.g. the VS Code SQLTools extension), you need to switch to the "legacy" authentication flow for MySQL.

To do this, you just need to connect to your database server (e.g. via MySQL Workbench) and then run the following command there:

Bagaimana cara instal MySQL?

Cara Install Mysql di Windows10.
Double klik installer MySQL (mysql-installer-community-8.0.12.0.msi). Atau klik kanan pada installer MySQL, kemudian pilih Install..
Nanti akan muncul dialog box penginstalan pertama seperti gambar di bawah ini. Silahkan centang “I accept the license terms“..

Apa saja perintah yang digunakan untuk menginstall MySQL server?

Instalasi MySQL. Jalankan perintah berikut untuk melakukan instalasi MySQL $ sudo apt-get update. $ sudo apt-get install mysql-server. ... .
Mengecek Hasil Instalasi MySQL. Setelah anda selesai melakukan instalasi program tersebut anda dapat mengecek koneksi ke database dengan perintah: $ mysql -u root -p..