How to install SQL Buddy on Ubuntu 16.04

How to install SQL Buddy on Ubuntu 16.04

SQL Buddy is an open source web based tool was written in PHP language that intended to manage SQLite and MySQL administration via web browsers like Firefox, Chrome, Safari, Opera and IE+ (Internet Explorer). SQL buddy offers a well-designed interface with a comprehensive feature set for database administrators and programmers. This article will explain the installation procedure of SQL Buddy on Ubuntu 16.04.

Installation procedure

For the SQL Buddy to run on Ubuntu, the LAMP environment is required to be installed prior to use SQL buddy, so first install the LAMP server and follow the instructions to install SQL Buddy. To download the SQL Buddy, go to http://sqlbuddy.com/ to download the package or else use below command to download via command line.

root@linuxhelp2:~#   wget https://github.com/calvinlough/sqlbuddy/raw/gh-pages/sqlbuddy.zip
--2017-07-07 10:34:23--  https://github.com/calvinlough/sqlbuddy/raw/gh-pages/sqlbuddy.zip
Resolving github.com (github.com)... 192.30.255.113, 192.30.255.112
Connecting to github.com (github.com)|192.30.255.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/calvinlough/sqlbuddy/gh-pages/sqlbuddy.zip [following]
--2017-07-07 10:34:25--  https://raw.githubusercontent.com/calvinlough/sqlbuddy/gh-pages/sqlbuddy.zip
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.0.133, 151.101.64.133, 151.101.128.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.0.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 385517 (376K) [application/zip]
Saving to: ‘ sqlbuddy.zip.2’ 
sqlbuddy.zip.2                    100%[===========================================================> ] 376.48K   174KB/s    in 2.2s   
2017-07-07 10:34:29 (174 KB/s) - ‘ sqlbuddy.zip.2’  saved [385517/385517]

Once the file is downloaded, extract the package into document root of Apache web server by using the unzip command.

root@linuxhelp2:~# unzip sqlbuddy.zip -d /var/www/html/
Archive:  sqlbuddy.zip
   creating: /var/www/html/sqlbuddy/
  inflating: /var/www/html/sqlbuddy/ajaxcreatetable.php 
  inflating: /var/www/html/sqlbuddy/ajaxfulltext.php 
  inflating: /var/www/html/sqlbuddy/ajaximportfile.php 
  inflating: /var/www/html/sqlbuddy/ajaxquery.php 
  inflating: /var/www/html/sqlbuddy/ajaxsavecolumnedit.php 
  inflating: /var/www/html/sqlbuddy/ajaxsaveedit.php 
  inflating: /var/www/html/sqlbuddy/ajaxsaveuseredit.php 
  inflating: /var/www/html/sqlbuddy/browse.php 
  inflating: /var/www/html/sqlbuddy/config.php 
 .
 .
 .
 .
 .
  inflating: /var/www/html/sqlbuddy/themes/classic/images/corner-bl.png 
  inflating: /var/www/html/sqlbuddy/themes/classic/images/corner-br.png 
  inflating: /var/www/html/sqlbuddy/themes/classic/images/corner-tl.png 
  inflating: /var/www/html/sqlbuddy/themes/classic/images/corner-tr.png 
  inflating: /var/www/html/sqlbuddy/themes/classic/images/header.png 
  inflating: /var/www/html/sqlbuddy/themes/classic/images/shading.png 
  inflating: /var/www/html/sqlbuddy/users.php 

The package has been unzipped. Now provide the owner and write permission to the document root directory by running the following commands.

root@linuxhelp2~# chown -R www-data:www-data -d /var/www/html/
root@linuxhelp2~# chmod 775  /var/www/html/

Open the browser and navigate to following URL http://192.168.7.160/sqlbuddy and press enter. It will lead to the SQL Buddy login page. Enter the required credentials and login.

Now the administrator can create, use, import or export the database, schemas and tables through SQL Buddy without any hitch.

That' s all. Now wasn' t that an easy installation process? SQL Buddy has a simple interface for the database adminstrators to use the databases more effectively.

FAQ
Q
How to take backup of MySQL db from command-line?
A
Use the following syntax to take backup of the mysqldump


# mysqldump (CurrentDB-name) (Backup-name).sql
Q
It is possible to set the weekly backup in automysqlbackup?
A
Yes, it is possible to set. Go to advanced settings and select the process

DOWEEKLY=6

Which day do you want weekly backups at? (1 to 7 where 1 is Monday)
Q
How do I export MySQL data to a plain text file with a format such as CSV, JSON, or XML?
A
The results view panel in Workbench has an "Export recordset to an external file" option that exports your result set to a wide variety of formats
Q
Does MySQL Workbench support the TLSv1.2 protocol?
A
Because of TLSv1.2 requires OpenSSL, support for this protocol is available for MySQL Workbench Commercial Editions, and not for the Community Edition (which is compiled using yaSSL and support
Q
How do I copy my saved MySQL connections in MySql Workbench to a different computer?
A
copy my saved MySQL connections in MySql Workbench to a different computer Go to the main navigation menu, choose Tools, Configuration, and then Backup Connections to create a Zip file with your configured MySQL connections. Next, load this file into your new Workbench.