Then keep the “backup.sql” safe, or copy it to another computer. Mysqldump -u USERNAME -p -all-databases > backup.sql To create a full backup of all the databases, you can use this command: It’s not complicated, pretty fast, and you’ll have your data available to import into your new system later on. Even if you want to switch to another database management system, I would recommend doing a backup at this point. If you have anything useful in your database or plan to reinstall MySQL later, it’s probably a good idea to do a full backup of your server before going further. You don’t really need this to uninstall MySQL or to create a backup, but we’ll check in the end that these folders are removed entirely. With MariaDB, it’s in /etc/mysql//50-server.cnf, look for a line starting with “datadir”: If you have any doubts, you can check the content of the configuration to see if a specific configuration has been made. Get the current installation pathīy default, the MySQL configuration files are stored under /etc/mysql and the data folder is /var/lib/mysql. If you’re new to the Linux command line, this article will give you the most important Linux commands to know, plus a free downloadable cheat sheet to keep handy. That’s the main package I want to remove while testing this tutorial for you. In my screenshot, you can see that MariaDB server is installed, with all the dependencies. If you also want to remove everything related to MySQL (even the client part), you can remove the last part (“grep server”) to see everything. It’s not perfect, but it’ll give you a good overview of the packages installed on your system. grep “server”: display only the lines with “server” in them.grep “mysql\mariadb”: display only the lines with either “mysql” or “mariadb”.dpkg -l: lists all packages installed on the system.Sudo dpkg -l | grep "mysql\|mariadb" | grep server The easiest way to list all of the packages installed is to use dpkg, with this command: So, even if you can’t find anything related to MySQL installed on your server, it might just be MariaDB. Please note that MySQL is generally replaced with MariaDB on recent systems. On Linux, there are often many dependencies for each package, and even if you just installed the MySQL server, there are most likely other packages linked to it. Oh, and did I mention the handy cheat sheet you get as a bonus?īefore uninstalling MySQL Server Check if MySQL is installed on your systemīefore doing anything else, it’s probably safe to start by checking what exactly is installed on your system. From basics to scripts, get ready to level up your Linux skills. With my e-book, Master Linux Commands, you’ll uncover the secrets of the terminal in a fun, step-by-step journey. For more information about Oracle (NYSE:ORCL), visit doesn’t have to be intimidating. Oracle offers a comprehensive and fully integrated stack of cloud applications and platform services. My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts. Remove configuration files (Optional)Ģ-4. To view full details, sign in with your My Oracle Support account.ĭon't have a My Oracle Support account? Click to get started!ġ-3. However, the uninstallation procedure is not found in the reference manual. How to uninstall MySQL packages or binaries from a Linux system? Installation procedure is explained in the page of the reference manual. Information in this document applies to any platform.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |