Index: /trunk/FACT++/src/fits2sql.cc
===================================================================
--- /trunk/FACT++/src/fits2sql.cc	(revision 19125)
+++ /trunk/FACT++/src/fits2sql.cc	(revision 19126)
@@ -72,4 +72,5 @@
         ("dry-run",        po_switch(),               "Skip any query which changes the databse (might result in consecutive failures)")
         ("print-extensions", po_switch(),             "Print extensions (tables) from fits file")
+        ("print-connection", po_switch(),             "Print database connection information")
         ("print-columns",  po_switch(),               "Print columns in fits table")
         ("print-insert",   po_switch(),               "Print the INSERT query (note that it contains all data)")
@@ -300,4 +301,5 @@
     const bool ignore_errors     = conf.Get<bool>("ignore-errors");
 
+    const bool print_connection  = conf.Get<bool>("print-connection");
     const bool print_extensions  = conf.Get<bool>("print-extensions");
     const bool print_columns     = conf.Get<bool>("print-columns");
@@ -461,4 +463,22 @@
     Database connection(uri);
 
+    if (print_connection)
+    {
+        try
+        {
+            const auto &res1 = connection.query("SHOW STATUS LIKE 'Compression'").store();
+            cout << "Compression of databse connection is " << string(res1[0][1]) << endl;
+
+            const auto &res2 = connection.query("SHOW STATUS LIKE 'Ssl_cipher'").store();
+            cout << "Connection to databases is " << (string(res2[0][1]).empty()?"UNENCRYPTED":"ENCRYPTED ("+string(res2[0][1])+")") << endl;
+        }
+        catch (const exception &e)
+        {
+            cerr << "\nSHOW STATUS LIKE COMPRESSION\n\n";
+            cerr << "SQL query failed:\n" << e.what() << endl;
+            return 6;
+        }
+    }
+
     try
     {
Index: /trunk/FACT++/src/root2sql.cc
===================================================================
--- /trunk/FACT++/src/root2sql.cc	(revision 19125)
+++ /trunk/FACT++/src/root2sql.cc	(revision 19126)
@@ -74,4 +74,5 @@
         ("no-insert",      po_switch(),               "Does not insert any data into the table")
         ("dry-run",        po_switch(),               "Skip any query which changes the databse (might result in consecutive failures)")
+        ("print-connection", po_switch(),             "Print database connection information")
         ("print-branches", po_switch(),               "Print the branches found in the tree")
         ("print-leaves",   po_switch(),               "Print the leaves found in the tree (this is what is processed)")
@@ -316,4 +317,5 @@
     const bool ignore_errors     = conf.Get<bool>("ignore-errors");
 
+    const bool print_connection  = conf.Get<bool>("print-connection");
     const bool print_branches    = conf.Get<bool>("print-branches");
     const bool print_leaves      = conf.Get<bool>("print-leaves");
@@ -478,4 +480,22 @@
         cerr << "SQL connection failed: " << e.what() << '\n' << endl;
         return 3;
+    }
+
+    if (print_connection)
+    {
+        try
+        {
+            const auto &res1 = connection.query("SHOW STATUS LIKE 'Compression'").store();
+            cout << "Compression of databse connection is " << string(res1[0][1]) << endl;
+
+            const auto &res2 = connection.query("SHOW STATUS LIKE 'Ssl_cipher'").store();
+            cout << "Connection to databases is " << (string(res2[0][1]).empty()?"UNENCRYPTED":"ENCRYPTED ("+string(res2[0][1])+")") << endl;
+        }
+        catch (const exception &e)
+        {
+            cerr << "\nSHOW STATUS LIKE COMPRESSION\n\n";
+            cerr << "SQL query failed:\n" << e.what() << endl;
+            return 6;
+        }
     }
 
Index: /trunk/FACT++/src/rootifysql.cc
===================================================================
--- /trunk/FACT++/src/rootifysql.cc	(revision 19125)
+++ /trunk/FACT++/src/rootifysql.cc	(revision 19126)
@@ -24,5 +24,5 @@
     po::options_description control("Rootify SQL");
     control.add_options()
-        ("uri,u",         var<string>()->required(),   "Database link as in\n\tuser:password@server[:port]/database.")
+        ("uri,u",         var<string>()->required(),   "Database link as in\n\tuser:password@server[:port]/database[/comp].")
         ("query,q",       var<string>(""),             "MySQL query (overwrites --file)")
         ("file",          var<string>("rootify.sql"),  "An ASCII file with the MySQL query (overwrites --query)")
@@ -44,4 +44,5 @@
         ("env.*",         vars<string>(),              "Predefined environment for substitutions in the query ($ENV)")
         ("list.*",        var<string>(),               "Predefined environment for substitutions in the query ($ENV). The list is read from the given file (one list entry per line)")
+        ("print-connection", po_switch(),              "Print database connection information")
         ("verbose,v",     var<uint16_t>(1),            "Verbosity (0: quiet, 1: default, 2: more, 3, ...)")
         ;
@@ -384,4 +385,5 @@
     const string   delimiter   = conf.Get<string>("delimiter");
     const vector<string> _ignore = conf.Vec<string>("ignore");
+    const bool  print_connection = conf.Get<bool>("print-connection");
     //const vector<Map> mymap    = conf.Vec<Map>("map");
 
@@ -494,4 +496,22 @@
 
     Database connection(uri); // Keep alive while fetching rows
+
+    if (print_connection)
+    {
+        try
+        {
+            const auto &res1 = connection.query("SHOW STATUS LIKE 'Compression'").store();
+            cout << "Compression of databse connection is " << string(res1[0][1]) << endl;
+
+            const auto &res2 = connection.query("SHOW STATUS LIKE 'Ssl_cipher'").store();
+            cout << "Connection to databases is " << (string(res2[0][1]).empty()?"UNENCRYPTED":"ENCRYPTED ("+string(res2[0][1])+")") << endl;
+        }
+        catch (const exception &e)
+        {
+            cerr << "\nSHOW STATUS LIKE COMPRESSION\n\n";
+            cerr << "SQL query failed:\n" << e.what() << endl;
+            return 6;
+        }
+    }
 
     try
