MyWebSQL, Web based Database Administration panel

Last month I presented Adminer, an alternative to PhpMyAdmin, and received a good comment from Kristin, recommending MyWebSQL for its simple interface.

I didn’t know this software and was glad to discover it.

MywebSQL main page screenshot

MyWebSQL is a web based administration panel for MySQL SQLite and PostgreSQL. Opensource and written in PHP, MyWebSQL is easy to deploy and manage while having good performance and developer friendly.

create database mywebsql

Indeed, with a look of desktop based application (right click menus, options and dialogs) while having a WYSIWYG table and query editor with syntax highlighting, MyWebSQL is a robust alternative to PHPMyAdmin.

table editor mywebsql

You can check their highlighted list of features here and give directly a try there.

Interested? Let’s see how to install it!

Installation

I will assume you have a Apache, MySQL and PHP configuration. If not, please check my previous tutorial covering the installation of these softwares.

1) Download and extract the latest version in your /var/www

cd /var/www
wget http://sourceforge.net/projects/mywebsql/files/latest/download -O mywebsql.zip
unzip mywebsql.zip
rm mywebsql.zip

2) Set the web server user, the owner of your mywebsql folder to ensure proper permission

chown -R www-data:www-data /var/www/mywebsql

And you’re on!

Simply go to http://YourIP/mywebsql to access to the adminstration panel.

MyWebSQL login page

Enter your MySQL credentials to manage your database(s).

If you want to customize MyWebSQL and tweak its config files, everything is inside the folder /var/www/mywebsql/config and should be quite self explanatory thanks to dev’s comments.

Although not mandatory, I strongly recommend you to force HTTPS connections to secure your MyWebSQL instance. Meanwhile you could also prefer to have a dedicated domain name instead of using the full URL and increase the maximum PHP upload file size limit (default 2mb). Either way, you can do all that through a dedicated virtualhost, and here is how to:

 

Virtualhost configuration

What you will need:

1) Create a A redirection in your DNS server/registrar with something like sql.domain.tld to your IP

2) Have SSL certificate ready. If not you can read this tutorial. (Optional)

3) Create your virtualhost as following:

In /etc/apache2/sites-enabled/, create a file called mywebsql (In root):

nano /etc/apache2/sites-enabled/mywebsql

and paste the following content:

<VirtualHost *:80>
        ServerAdmin webmaster@domain.tld
        ServerName sql.domain.tld
        Redirect / https://sql.domain.tld
</VirtualHost>

<IfModule mod_ssl.c>
<VirtualHost *:443>
        SSLEngine on
        SSLCertificateFile /etc/ssl/certs/myblog.pem
        SSLCertificateKeyFile /etc/ssl/private/myblog.key

        ServerAdmin webmaster@domain.tld
        ServerName sql.domain.tld

        DocumentRoot /var/www/mywebsql
        <Directory />
                Options FollowSymLinks
                AllowOverride All
       </Directory>
        <Directory /var/www/mywebsql>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

       php_value max_execution_time = 1000
       php_value post_max_size = 20M
       php_value upload_max_filesize = 20M
       php_value memory_limit = 256M

</VirtualHost>
</IfModule>

Adapt the content (Servername, webmaster email, SSL certificate, directory and php values).

When done, save the file (CTRL+X then Yes) and reload apache: (In root)

/etc/init.d/apache2 reload

You should now be able to access to your MyWebSQL instance through sql.domain.tld.  It should automatically redirect your to its HTTPS version and you should be able to upload/import files up to 20Mb.

 

 

sql query analysis

Gravatar

Loves to discover web-based apps to install on his own server@home and write articles about it

0 Comments:

Add a comment