[glom] MySQL: Add comments about AppArmor stopping use of MySQL on Ubuntu.



commit bb55ef3fefc03057cb221decc49080ad4e8dc475
Author: Murray Cumming <murrayc murrayc com>
Date:   Sun Jan 13 14:14:11 2013 +0100

    MySQL: Add comments about AppArmor stopping use of MySQL on Ubuntu.
    
            * glom/libglom/connectionpool_backends/mysql_self.cc:
            * tests/test_selfhosting_utils.cc: Mention this bug:
    https://bugs.launchpad.net/ubuntu/+source/mysql-5.5/+bug/1095370

 ChangeLog                                          |    8 ++++++++
 glom/libglom/connectionpool_backends/mysql_self.cc |    3 +++
 tests/test_selfhosting_utils.cc                    |    2 ++
 3 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b0afe15..70d4f1b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-01-13  Murray Cumming  <murrayc murrayc com>
+
+        MySQL: Add comments about AppArmor stopping use of MySQL on Ubuntu.
+
+        * glom/libglom/connectionpool_backends/mysql_self.cc:
+        * tests/test_selfhosting_utils.cc: Mention this bug:
+	https://bugs.launchpad.net/ubuntu/+source/mysql-5.5/+bug/1095370
+
 2013-01-11  Murray Cumming  <murrayc murrayc com>
 
         MySQL: Add checkboxes to select MySQL when it is in the build.
diff --git a/glom/libglom/connectionpool_backends/mysql_self.cc b/glom/libglom/connectionpool_backends/mysql_self.cc
index dfd47e4..49919c4 100644
--- a/glom/libglom/connectionpool_backends/mysql_self.cc
+++ b/glom/libglom/connectionpool_backends/mysql_self.cc
@@ -178,6 +178,9 @@ Backend::InitErrors MySQLSelfHosted::initialize(const SlotProgress& slot_progres
   // We don't use mysql_secure_installation because it only takes the details via prompts.
   // TODO: With MySQL 5.6, use the new --random-passwords option, because otherwise the root password will be blank,
   // and, at least on Ubuntu, we will then not be able to connect with mysqladmin.
+  //
+  // Note: This will fail on Ubuntu because its AppArmor configuration prevents use of MySQL in non-default directories:
+  // https://bugs.launchpad.net/ubuntu/+source/mysql-5.5/+bug/1095370
   const std::string command_initdb = get_path_to_mysql_executable("mysql_install_db")
     + " --no-defaults" //Otherwise Ubuntu specifies --user=mysql
     + " --datadir=" + Glib::shell_quote(dbdir_data);
diff --git a/tests/test_selfhosting_utils.cc b/tests/test_selfhosting_utils.cc
index ba53956..5b3ca75 100644
--- a/tests/test_selfhosting_utils.cc
+++ b/tests/test_selfhosting_utils.cc
@@ -563,6 +563,8 @@ int test_all_hosting_modes(const SlotTest& slot)
 //though the functionality is always built in libglom.
 //We usually use GLOM_ENABLE_MYSQL only in the UI code,
 //but let's avoid forcing people to install the MySQL server.
+//Also, Ubuntu's AppArmor will not let use start a MySQL process by default anyway.
+//See https://bugs.launchpad.net/ubuntu/+source/mysql-5.5/+bug/1095370
 #ifdef GLOM_ENABLE_MYSQL
   if(!test_hosting_mode(slot, Glom::Document::HOSTING_MODE_MYSQL_SELF, "MySQL"))
     return EXIT_FAILURE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]