For new users and students, this can be an easy way to manage MariaDB databases without installing any client applications or using the terminal. The reason it’s easy is that all database management is done in the browser. no complicated database queries and commands to run from the terminal. So, if you’re new and need help managing MariaDB databases using MyWebSQL, the steps below are a good starting point. For those not comfortable managing MariaDB databases via the Linux command line, they may want to try the MyWebSQL web interface instead. For more about MyWebSQL, please visit its homepage.
Step 1: Install Apache2 HTTP Server on Ubuntu
Apache2 HTTP Server is the most popular web server in use. To install Apache2 HTTP on the Ubuntu server, run the commands below After installing Apache2, the commands below can be used to stop, start and enable the Apache2 service to always start up with the server boots.
Install MariaDB Database Server
Run the commands below to install the MariaDB database server After installing MariaDB, the commands below can be used to stop, start and enable the MariaDB service to always start up when the server boots. Run these on Ubuntu 16.04 LTS Run these on Ubuntu 17.10 and 18.04 LTS After that, run the commands below to secure the MariaDB server by creating a root password and disallowing remote root access. When prompted, answer the questions below by following the guide.
Enter current password for root (enter for none): Just press the Enter Set root password? [Y/n]: Y New password: Enter password Re-enter new password: Repeat password Remove anonymous users? [Y/n]: Y Disallow root login remotely? [Y/n]: Y Remove test database and access to it? [Y/n]: Y Reload privilege tables now? [Y/n]: Y
Restart MariaDB server
Install PHP 7.2 and Related Modules
PHP 7.2 isn’t available on Ubuntu default repositories… to install it, you will have to get it from third-party repositories. Run the commands below to add the below third party repository to upgrade to PHP 7.2 Then update and upgrade to PHP 7.2 Run the commands below to install PHP 7.1 and related modules.
Install MyWebSQL
To download and configure MyWebSQL, run the commands below. Then run the commands below to extract the downloaded files to the Apache2 root directory. This should create a new folder called mywebsql. Next, run the commands below to configure the correct permissions. Next, run the commands below to change the root folder permissions. Restart Apache2. After that, open your browser and browse to the server hostname or IP address followed by mywebsql You should then see the login page for MyWebSQL. Log in with your MariaDB root account. That’s it! If you’re unable to log on and getting errors connecting to the database, run the commands below to fix MySQL root user logon issues. Login to the MariaDB server by running the commands below type the password you created above. That should get you into the database server. After that, run the commands below to disable plugin authentication for the root user Restart and run the commands below to set a new password. You may also like the post below: