Linux and F.O.S.S enthusiast, love to work on open source platform and technologies.Last updated on Aug 2, 2020 | Published on Jun 27, 2020How to Secure Nginx with Let’s Encrypt on Ubuntu 16.04How to Secure Nginx with Let’s Encrypt on Ubuntu 16.10Last updated on Aug 2, 2020 | Published on May 22, 2019Last updated on Aug 2, 2020 | Published on Jun 21, 2019Last updated on Aug 1, 2020 | Published on Mar 9, 2019Last updated on Aug 1, 2020 | Published on Sep 21, 2019This website uses cookies to improve your experience. In this tutorial article, we will learn the methods to install MariaDB into Ubuntu 20.04 operating system. When I tried to install MariaDB by typing: sudo apt-get install mariadb-server The installation went smoothly but during the process I was not prompted to input the password for the mysql root account. Press You can find the default data directory of MySQL/MariaDB database very easily with the As you can see, the default data directory for the MariaDB database server is The default data directory for the MySQL database server is In the next sections, I am going to show you how to prepare a hard disk or SSD partition for MySQL/MariaDB data directory and change the default data directory.In this section, I am going to show you how to prepare your Hard Disk or SSD partition for MySQL/MariaDB data directory.You can list all the installed hard drives or SSDs on your computer with the following command:All the installed hard drives and SSDs should be listed. Thanks for reading this article.Freelancer & Linux System Administrator.
Now, you have to make a new partition on the hard drive Let’s say, the hard drive partition you want to use as the MySQL/MariaDB data directory is Now, add the following line at the end of the file and save the file by pressing Now reboot your computer with the following command:Now, you have to stop MySQL/MariaDB database service and copy all the files from the default data directory If you’re using MariaDB, then stop MariaDB service with the following command:If you’re using MySQL, then stop MySQL service with the following command:Now, copy all the contents of the default data directory Now, add the following line at the end of the file and save it by pressing Now, restart apparmor service with the following command:Now, you’re ready to change the data directory of MySQL/MariaDB.If you’re using MariaDB, then the configuration file you have to edit is If you’re using MySQL, then the configuration file to edit is Now, edit the required configuration file depending on whether you’re using MySQL/MariaDB as follows:Now, find the line as marked in the screenshot below.Now, start the MySQL/MariaBD service with the following command:Now, try to connect to the MySQL/MariaDB server as follows:Then, type in the password of the MySQL/MariaDB server and press You should be logged in to the MySQL/MariaDB shell as But, just to be sure, type in the following query to find which directory MySQL/MariaDB is currently using as the data directory.So, that’s how you change the MySQL/MariaDB data directory on Ubuntu. Of course, if you are one of our Cloud VPS Hosting customers, you don’t have to install MariaDB on your Ubuntu 18.04 Cloud VPS – simply ask our admins, sit back and relax. I am currently studying Electronics and Communication Engineering at Khulna University of Engineering & Technology (KUET), one of the demanding public engineering universities of Bangladesh. Also loves Web API development with Node.js and JavaScript. The next screen will appear to enter the password for user root. Linux and F.O.S.S enthusiast, love to work on open source platform and technologies.MariaDB is a multi-thread, open-source relational database management system, a perfect replacement of MySQL database system. MariaDB is the most powerful open source database server and widely used relational database management system. I am Satish Kumar, Founder of LinuxConcept. Our admins will install MariaDB on Ubuntu 18.04 for you immediately. By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. In this article, I am going to show you how to change the MySQL/MariaDB database’s default data directory on Ubuntu. We also learned to install MariaDB directly from MariaDB repository, how to secure MariaDB installation and connect process from CLI.Join world's largest Linux lovers community and get update from our team.I am Satish Kumar, Founder of LinuxConcept.