Database Setup For MySQL

This page provides instructions for configuring Confluence to use the MySQL database.

Step 1. Check the prerequisites

Check the following before you start:

  • Check that your version of MySQL is supported. See Supported Platforms.

      Note about MariaDB and Percona Server...

    We do not currently support MariaDB or Percona Server. Both are known to have issues with Confluence.  See  CONF-36471 New  and  CONF-29060 Open  for more information.

  • If you have been evaluating Confluence using the embedded database and wish to transfer your data to a new database, consult the following guide first: Migrating to Another Database.
  • If you are migrating from another database, consult the following guide first: Migrating to Another Database.

Step 2. Install MySQL Server

If you do not already have an operational MySQL database server, install 'MySQL Community Edition'. Download the installation package from the MySQL download page and follow the instructions in the MySQL documentation.

Step 3. Configure MySQL Server

In this step, you will configure your MySQL database server.

Note: If you intend to connect Confluence to an existing MySQL database server, we strongly recommend that you reconfigure this database server by running through the configuration steps in the MySQL installation wizard as described below .

To configure MySQL Server:

  1. Run the MySQL installation wizard:
    1. If you are connecting Confluence to your existing MySQL server, choose Reconfigure Instance.
    2. Choose Advanced Configuration.
    3. Choose the type of MySQL Server that best suits your hardware requirements. This will affect the MySQL Server's usage of memory, disk and CPU resources. Refer to the MySQL documentation for further information.
    4. Choose Transactional Database Only to ensure that your MySQL database will use InnoDB as its default storage engine.
      It is highly recommended that you only use the InnoDB storage engine with Confluence. Avoid using the MyISAM storage engine as this can lead to data corruption.
    5. Set the InnoDB Tablespace settings to your requirements. (The default settings are acceptable.)
    6. Set the approximate number of concurrent connections permitted to suit your Confluence usage requirements. You can use one of the presets or enter a number manually. Refer to the MySQL documentation for further information.
    7. For the networking options, ensure the Enable TCP/IP Networking and Enable Strict Mode options are selected (default). Refer to the MySQL documentation on setting the networking and server SQL modes for further information.
    8. For the MySQL server's default character set, choose Best Support For Multilingualism (in other words, UTF-8). This will ensure Confluence's support for internationalisation. For more information, see Configuring Database Character Encoding.
    9. For the Windows configuration option, choose whether or not to install the MySQL Server as a Windows service. If your hardware is going to be used as a dedicated MySQL Server, you may wish to choose the options to Install As Windows Service (and Launch the MySQL Server automatically). Refer to the MySQL documentation for further information.
      Note: If you choose not to install the MySQL Server as a Windows Service, you will need to ensure that the database service has been started before running Confluence.
    10. Select Modify Security Settings to enter and set your MySQL Server (root) access password.
  2. Edit the my.cnf file (my.ini on Windows operating systems) in your MySQL server. Locate the [mysqld]section in the file, and add or modify the following parameters:
    (Refer to MySQL Option Files for detailed instructions on editing my.cnf and my.ini.)
    Locate the [mysqld]section in the file, and add or modify the following parameters:
    • Specify the default character set to be UTF-8:

    • Set the default storage engine to InnoDB:

    • Specify the value of max_allowed_packet to be at least 256M:

    • Specify the value of innodb_log_file_size to be at least 256M for MySQL 5.5 and below:

      NB: This should be set to at least 2G for MySQL 5.6 and above.

    • Ensure the sql_mode parameter does not specify NO_AUTO_VALUE_ON_ZERO

  3. Restart your MySQL server for the changes to take effect:
    • On Windows, use the Windows Services manager to restart the service.
    • On Linux:
      • Run one of the following commands, depending on your setup: '/etc/init.d/mysqld stop' or '/etc/init.d/mysql stop' or 'service mysqld stop'.
      • Then run the same command again, replacing 'stop' with 'start'.
    • On Mac OS X, run 'sudo /Library/StartupItems/MySQLCOM/MySQLCOM restart'.

Step 4. Set up your MySQL database and user

In this step you will create a database within MySQL to hold your Confluence data, and a database user with authority to access that database.

To create the database and user privileges:

  1. Run the 'mysql' command as a MySQL super user. The default user is 'root' with a blank password.
  2. Create an empty Confluence database schema by running this command:

  3. Create the Confluence database user by running this command. Replace 'confluenceuser' and 'confluencepass' with a username and password of your choice. If Confluence is not running on the same server as your MySQL database server, replace 'localhost' with the hostname or IP address of the Confluence server:

Step 5. Install Confluence

Install Confluence if you have not done so already. See the Confluence Installation Guide. Stop immediately after the installation, before opening the Confluence Setup Wizard in your browser, and follow the steps below.

If you have already got part-way through the Confluence Setup Wizard, stop at the database setup step and follow the steps below. You will be able to restart the setup wizard at the same step later.

Step 6. Download and install the MySQL database driver

If you are upgrading Confluence to a later version, and you are already using the recommended MySQL driver (JDBC Connector/J 5.1), you can skip the instructions in this section. The Confluence upgrade task will automatically copy over your existing driver to the upgraded installation.

If you are installing Confluence, or you are upgrading Confluence and not using the recommended MySQL driver (JDBC Connector/J 5.1), follow the steps below.

Choose whether you will set up a direct JDBC connection or a datasource connection to MySQL, to suit your environment. If unsure, choose direct JDBC.

To set up a direct JDBC connection:

If you plan to set up a direct JDBC connection to MySQL, you will need to copy the MySQL JDBC driver to your Confluence installation.

  1. Get the MySQL driver:
    • If you are installing Confluence, download the recommended MySQL driver . Links to the appropriate database drivers are available on this page: Database JDBC Drivers.
      You can download either the .tar.gz or the .zip archive. Extract the driver JAR file (for example, mysql-connector-java-x.x.x-bin.jar, where x.x.x is a version number) from the archive.
    • If you are upgrading Confluence to a later version, and you are not using the recommended MySQL driver (JDBC Connector/J 5.1), copy the driver JAR file from your existing Confluence installation before you upgrade. The driver will be in the <Confluence installation> /confluence/WEB-INF/lib folder.
  2. Copy the driver JAR file to the  <Confluence installation> /confluence/WEB-INF/lib folder in your new or upgraded Confluence installation.

To set up a datasource connection:

If you plan to set up a datasource connection to MySQL, follow the steps described in Configuring a MySQL Datasource in Apache Tomcat.

Step 7. Check settings for internationalisation

If you are using a existing database, use the status command to verify database character encoding information. The results should be UTF-8. See Configuring Database Character Encoding.

Step 8. Set up your database connection in the Confluence Setup Wizard

Start Confluence, and go to the Confluence Setup Wizard in your browser. Follow these steps to set up the new configuration:

  1. Follow the initial steps in the Confluence Setup Guide.
  2. When prompted to choose an evaluation or production installation, choose production installation.
  3. When prompted to choose an embedded or external database, select MySQL from the dropdown list and choose External Database.
    (Note: you'll see a warning that a driver is required. You downloaded or copied the driver in step 6 so you can ignore this warning) 
  4. Choose either the direct JDBC or the datasource connection, to suit the choice you made earlier when setting up the MySQL database driver.
    • For the JDBC connection: Enter the username (for example, confluenceuser) and password you chose earlier. 
    • For a datasource connection: Set the JNDI name to java:comp/env/jdbc/confluence

Congratulations! Confluence is now using your MySQL database to store its data.

Troubleshooting

  • If you get the following error message, verify that you have given the confluenceuser user all the required database permissions when connecting from localhost.

    Could not successfully test your database: : Server connection failure during transaction. Due to underlying exception: 'java.sql.SQLException: Access denied for user 'confluenceuser'@'localhost' (using password: YES)'
  • If Confluence complains that it is missing a class file, you may have placed the JDBC driver in the wrong folder.
  • If none of the above describes your issue, please create a support ticket at http://support.atlassian.com and be sure to include your logs (found in <CONFLUENCE-INSTALLATION>/logs and <CONFLUENCE-HOME>/logs).
  • There's currently a known issue for MySQL 5.5  CONF-37829 - Improve select query that used in Confluence for copying a page Resolved

Was this helpful?

Thanks for your feedback!

149 Archived comments

  1. User avatar

    Jenny Liu

    Does anyone know of a similar tutorial for Confluence running on Linux systems? Thanks in advance!

    17 Nov 2005
    1. User avatar

      Jens Schumacher [Atlassian]

      Jenny,

      The procedure for linux will be very similar. The main difference is that you won't have the MySQL Administrator Tool.

      Instructions on how to install MySQL on Linux can be found here:
      http://dev.mysql.com/doc/refman/5.0/en/linux-rpm.html

      Step2 onwards is very similar to what you will have to do on linux. The only difference is that the path to your installation on linux looks different.

      Cheers,
      Jens

      18 Nov 2005
  2. User avatar

    James McCleese

    A couple of points: 

    • The confluence setup wizard expects the database schema to be called 'confluence' rather than 'confluencedb'.   This is not a big problem because the setup wizard value can be changed during setup.
    • The Linux version of the mysql-admin GUI application seems to have a bug (as of writing) where it can't change user privileges.  If you encounter this bug, you may need to use the following mysql commands to setup the privileges manually (substitute your password for <the password>):
    30 Apr 2006
  3. User avatar

    Alex Holtz

    Assuming you have MySQL installed and running with a password for the root mysql user, you can perform the linux side of the MySQL setup entirely from the command-line with the following:

    1.  Login to the mysql client as the root mysql user:
      $ mysql -u root -p;
      
    2. Create the database:
      CREATE DATABASE <dbname>;
      
    3. Grant the privileges: (I am specifically avoiding the global *.* notation because this would grant privileges across all databases.)
      GRANT ALL PRIVILEGES ON <dbname>.* TO 'confluenceuser'@'<hostname>' IDENTIFIED BY '<password>';
      
      • Replace <dbname> with the name of the database; you should probably use 'confluence' unless you have a good reason to use something else.
      • Replace <hostname> with the hostname of the server that will connect to the database (this will also be the hostname of the server running confluence)
      • Replace <password> with the desired password.
    4. Flush Changes:
      FLUSH PRIVILEGES;
      
    12 Sep 2006
    1. User avatar

      Anonymous

      CREATE DATABASE confluence CHARACTER SET utf8 COLLATE utf8_bin;

      21 Jul 2009
      1. User avatar

        Rick Carini

        Please update Step 4 above with this CREATE DATABASE statement from 'Anonymous'.  Step 4 is not consistant with your own documentation, "Configuring Database Character Encoding"

        Thanks!

        Rick

        23 Apr 2013
        1. User avatar

          Ryan Goodwin [Atlassian]

          This is addressed in the database configuration steps, not the creation of the database. Step 2 above describes the configuration of the my.cnf or my.ini file:

          Step3.ConfigureMySQLServer

          23 Apr 2013
          1. User avatar

            Rick Carini

            Forgive me, but I don't see where that will address the COLLATE utf8 settings.

            The link within Step 3.1, sub h. has the  COLLATE utf8  when you create your database, but it gets confusing when you see a different CREATE DATBASE in Step 4, later.  Also you might want to also include mention of the 'collation-server=utf8_bin' under the \[mysqld\] section of my.cnf.

            Perhaps this is something obvious that mysql admins will take for granted.

            This query really helped me find what character set each table column was using:

            But I think the biggest confusion is that there are different CREATE DATABASE references in different places.  Even the JIRA documentation for "Connecting JIRA to MySQL" recommends using the:

            CREATE DATABASE <dbname> CHARACTER SET utf8 COLLATE utf8_bin;

            Please feel free to correct me if I am way off-base here.

            Rick

            23 Apr 2013
  4. User avatar

    Pavel Chilman

    MySQL 'Community' Database Server version 4.1.x no longer includes mySQL Administrator. However, I was able to download it separately as part of MySQL GUI Tools Bundle for 5.0

    09 Jul 2007
  5. User avatar

    Rex Kidwell

    Has anyone determined the MySQL (or Oracle) roles/privileges needed to install and configure the Confluence database? 

    • GRANT ALL PRIVILEGES on *.* 
      Results in the account having full access to all databases on server.  The account is more or less the same as the MySQL root account.
    • GRANT ALL PRIVILEGES on confluence.* 
      Results in the account having full access to the database, confluence.

    A related question is, has anyone determined the MySQL (or Oracle) roles/privileges needed to allow the Confluence application to run on a MySQL (or Oracle) database?  The difference being, it may take full access to import a database but after the import is done you could remove import permissions. 

    Some corporate IT organizations don't allow this level (open ended) of access without pulling a few teeth.

    28 Aug 2007
  6. User avatar

    Anonymous

    Can anyone tell me if there are any know issues with Confluence and a MySQL set up with two-way replication.

    16 Nov 2007
    1. User avatar

      Tony Cheah Tong Nyee

      Hi there,

      I believe you meant to say supporting Database fail-over? If this is the case, I am sorry to say that Confluence does not support such scenario. You may be interested to look at the following feature request regarding Confluence supporting Database fail-over:

      Feel free to cast your vote to increase its popularity and add yourself as a watcher for future updates. You may also add comments to the feature request to share your idea and truly reflect the importance of this feature to you.

      Cheers,
      Tony

      19 Nov 2007
  7. User avatar

    Joe Kraska

    Gentlemen,

    This guide has an error.

    The instructions tell me to name the database 'confluencedb', but the default URL (the one that comes up on the web based autoconfigurator for confluence 2.6.2) is just 'confluence' for the db.

    While I was able to get past this, one of these two things is wrong.

    Joe Kraska

    San Diego CA

    USA

    02 Jan 2008
    1. User avatar

      Ming Giet Chong

      Hi Joe,

      By default, Confluence provides a sample URL during the Database Connection Setup:

      jdbc:mysql://localhost/confluence?autoReconnect=true
      

      User can specify database names up to their liking such as confluence, confluencedb or any other names. The above database URL, confluence is simply a reference to the Confluence database created. Hence, users will need to change the URL accordingly.

      Regards,
      MG

      02 Jan 2008
      1. User avatar

        Anonymous

        This comment was useful.

        27 Jul 2009
  8. User avatar

    Anonymous

    Hello,

    I don't understand why one has to set the default_storage_engine for your entire MySQL server to InnoDB?  I use Hibernate a lot and the Confluence Hibernate configuration should be specifying the property hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect and when doing the schema creation Hibernate will do CREATE TABLE ... ( ... ) ENGINE=InnoDB.

    The problem is that in a centralized MySQL server setup in an organization other applications/users will have databases on the same MySQL server and then they have to be adversely affected if you set default_storage_engine=InnoDB.

    Is there a way to not have to set this server parameter?

    thank you

    01 Dec 2008
    1. User avatar

      Anonymous

      Hello again,

      Thought of a simple option: is it possible to set the default_storage_engine=innodb before installation and configuration and then after its all done unset it?  And then of course remember to have to redo this during upgrades?

      01 Dec 2008
      1. User avatar

        Ming Giet Chong

        Hi,

        Please note that this is the MySQL known issue as described here. You are recommend to set "InnoDB" for the storage engine. See here for storage engine setting.

        Hope this helps.

        Regards,
        MG

        20 Jan 2009
        1. User avatar

          Giles Gaskell

          Hi there,

          The documentation above has had substantial changes, which if followed, now ensures that the default_storage_engine=INNODB has been set before the database is created (via the MySQL Administrator GUI utility) and tables (during Stage 3 above). This should ensure that all the tables created for Confluence use the InnoDB storage engine.

          Once you've done this, you should (as you mentioned) be able to 'deactivate' the Default Storage option (via the MySQL Administrator) or set it to something else. However, you should re-enable it and set it to InnoDB prior to a Confluence upgrade.

          Cheers,
          Giles.

          17 Jul 2009
          1. User avatar

            Patrick Schwabl

            Hi!

            To set the InnoDB Storage Engine only for Confluence as default, I have configured a MySQL Datasource in Apache Tomcat and set in the server.xml

            In the Confluence Setup Wizard I have set the external database to the mysql datasource.

            All tables that were created by the Confluence Instanze, the Storage Engine will be set to InnoDB. (My default Engine is MyISAM)

            Cheers

            19 Feb 2010
        1. User avatar

          Anonymous

          I believe its default-storage-engine=InnoDB

          (with a slash, not an underscore)

          25 Jan 2011
  9. User avatar

    Anonymous

    Step 1 Stage 5 should say "Call the new Schema 'confluence'." to match the default JDBC connection URL. You'll get a MySQLNonTransientConnectionException if the database name isn't properly specified in the JDBC connection URL.

    09 Dec 2008
    1. User avatar

      Anonymous

      err... Stage 1 Step 5

      09 Dec 2008
      1. User avatar

        Giles Gaskell

        Thank you for your comment.

        The documentation above has now been amended accordingly. In fact, you can call the MySQL DB schema anything you want, although as you've highlighted above, you'll just have to ensure that during the Confluence setup wizard, the JDBC connection URL matches the name of your DB schema.

        Last but not least, since additional steps have been added to stage 1, 'step 5' is now 'step 7'.

        Cheers,

        Giles Gaskell
        Technical Writer
        ggaskell@atlassian.com
        ATLASSIAN - http://www.atlassian.com

        27 Jul 2009
  10. User avatar

    Tom Moore

    This document has errors on the installation directory parameters.. I.e. their is no WEB-INF in the root home folder, but rather here:

    Confluence Installation Directory/confluence/WEB-INF/lib

    That being said, putting the mysql jar in that directory doesn't work with 2.10.1 apparently.

    UPDATE:

    The correct location for the mysql jar file is actually Confluence Installation Directory/lib

    Please update the doc

    22 Jan 2009
    1. User avatar

      Giles Gaskell

      Hi Tom,

      Thanks for your comment. The documentation above has been corrected in line with your comments.

      Please be aware that installing the MySQL Connector/J driver file (mysql.jar) to either Confluence Installation Directory/confluence/WEB-INF/lib or Confluence Installation Directory/lib should work on your Confluence Standalone installation. However, it depends on how this driver has been configured to work with Confluence.

      If configuring the MySQL Connector/J driver within your application server (Apache Tomcat) that runs Confluence, the driver file should be installed in Confluence Installation Directory/lib.

      If configuring the MySQL Connector/J driver within Confluence itself, the driver file can be installed in Confluence Installation Directory/confluence/WEB-INF/lib.

      Hope this information helps.

      Best regards,

      Giles Gaskell
      Technical Writer
      ggaskell@atlassian.com
      ATLASSIAN - http://www.atlassian.com

      27 Jan 2009
  11. User avatar

    Alex Jurkiewicz

    Where is hostname / username / password stored by Confluence after you tell it where MySQL is?

    11 Mar 2009
    1. User avatar

      Azwandi Aris [Atlassian]

      The database connection details are stored in the "confluence.cfg.xml", resides in the Confluence Home Directory.

      11 Mar 2009
  12. User avatar

    Anonymous

    Hello All,

    a basic question on adding a data source for team hosted confluence implementation, how do I add a mysql data source, site administration doesnt show any option for it,

    Please help.

    Thanks.

    Nambi B

    19 Mar 2009
    1. User avatar

      Azwandi Aris [Atlassian]

      Hi Nambi,

      To add a MySQL JNDI datasource, you will need to modify it through the Confluence Context Descriptor (i.e server.xml for Confluence standalone). I am afraid that this option is not available for Confluence Team Hosted users as it will require a modification to the filesystem.

      Cheers,
      Azwandi

      30 Mar 2009
      1. User avatar

        Anonymous

        Hello Azwandi,

        Thanks for your response, since this SQL Plug-In is not supported by Confluence, and how would I approach this to get the MYSQL datasource added to the team hosted solution? any thoughts?

        Thanks.

        Nambi.

        03 Apr 2009
        1. User avatar

          Azwandi Aris [Atlassian]

          Hi Nambi,

          You can refer to this documentation for plugins installation request. Please note that we may not be able to fulfil your requests, as it is a shared hosting. There is also a documentation on that here.

          Cheers,
          Azwandi

          06 Apr 2009
          1. User avatar

            Anonymous

            Hi Azwandi,

            Since our's is hosted by confluence, I have approached them to enable the configuration changes to add the MySQL data sources and it's in progress.

            appreciate your replies.

            -Nambi

            23 Apr 2009
  13. User avatar

    Anonymous

    After i copy the jdbc jar to both lib and WEB-INF/lib, it still gives an error:
    The following error(s) occurred:
    The specified database driver was not found. If you are running Confluence Standalone, please ensure that you have copied your database's JDBC driver into the common/lib directory. Otherwise, consult your application server documention for instructions on how to add the drivers to your server classpath.
    You will need to restart your server after installing the drivers. (Setup will resume at the beginning of the database setup step).

    What caused this?

    I'm configuring it for mysql and i'm able to connect jira installed on the same server to connect mysql successfully.

    Thanks,

    17 Apr 2009
    1. User avatar

      Arie Murdianto

      Hi,

      If you configure Confluence database configuration in JNDI, you need to put the driver into Application servier's lib directory. Please give a try to put the driver to <Confluence install>/lib (I presume that you use Confluence standalone version 2.10.x). You may want to raise this problem to Atlassian's support system:

      Cheers,

      06 May 2009
  14. User avatar

    Anonymous

    I'm a newb to SQL so please forgive my ignorance, but I need to query an SQL Database located on another server on the network from Conlfuence.  I want to display the results of that query on a Confluence page.  Can anyone help?

    21 May 2009
    1. User avatar

      Somayya El Gemei

      Hi there,

      You will need to install the SQL plugin from the Plugin Repository.  It displays the result table or values from the SQL query formatted in a table on a Confluence page. Here is the link to the Plugin Documentation page.

      21 May 2009
  15. User avatar

    Martin Cleaver [Blended Perspectives]

    On a debian machine you can install connector/j from apt-get using

    Then find it:

    And link (or you could copy) from it:

    07 Aug 2009
  16. User avatar

    Simon Wheatley

    The DB config screen in 2.10.4 says:

    please ensure that you have copied your database's JDBC driver into the common/lib directory

    It should say (i.e. no "common/"):

    please ensure that you have copied your database's JDBC driver into the lib directory

    21 Aug 2009
  17. User avatar

    Anonymous

    Hello,

    Has anyone tried setting up a redundant MySQL database for confluence in master/slave mode? We are looking into having a read-only fully redundant slave with its own copy of the database and application server to improve system stability. Would this even work with hibernate and coherence persistance, if so what tables should we look at NOT replicating across? Anything else we should look out for?

    Thanks a ton!

    26 Oct 2009
    1. User avatar

      Azwandi Aris [Atlassian]

      Hi, there. I would suggest you to raise this question in Atlassian Answers - there might be other users/developers who can share their experience with you.

      23 Nov 2009
  18. User avatar

    Anonymous

    Can you enumrate precisely what grants are required by the web configurator for MySQL?  Those of us in a shared enterpirse environment are not given the luxury of wholesale grant privelages as are not given root access.  Here's what my confluence user account currently has:

    GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, LOCK TABLES

     GRANT USAGE ON *.* TO ...

    28 Oct 2009
  19. User avatar

    Abdallah

    Hi all,

    I am trying to connect confluence to mysql database on redhat linux. I am getting the following error.

    The following error(s) occurred:

    • Configuring the database failed. Couldn't create the database schema.
    • com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
      Any help.

    Thanks,

    Abdallah

    13 Jan 2010
    1. User avatar

      Azwandi Aris [Atlassian]

      Hi Abdallah,

      The error message suggests that there is a problem in connecting to the MySQL database. If the DB server is remote, try to telnet into the server to check if TCP connection is enabled:

      You might also want to use a DB client to test this. Check if firewall/antivirus allows the connection. Also, check out this further troubleshooting steps. Hope that helps!

      Cheers,
      Azwandi

      15 Jan 2010
      1. User avatar

        Mitja Orzeszko

        I have the same problem while setting up the database. But I can connect to it using telnet, phpMyadmin and MySQL Administrator.

        I am setting up Confluence 3.1 on a Debian 5.0.3 with mysql-connector-java-5.1.10, all on one host.

        Any ideas?

        Yours sincerely

        Mitja Orzeszko

        15 Jan 2010
        1. User avatar

          Azwandi Aris [Atlassian]

          Hi Mitja,

          I'd suggest you to raise a support ticket at https://support.atlassian.com and attach a copy of atlassian-confluence.log for our review.

          Cheers,
          Azwandi

          19 Jan 2010
  20. User avatar

    Anonymous

    1) Check your username and pass is correct (can it access from mysql administrator tool?)

    2) Check URL is correct (ie. if your db name is 'confluencedb' then that should be in the url, not 'confluence')

    Zac Craven

    04 Feb 2010
  21. User avatar

    Anonymous

    This may seem like a silly snag but I can't find the Config Wizard!  

    I want to transition from HSQL to MySQL. I've now successfully set up MySQL and Tomcat.

    Please advise where I now find and launch the Config Wizard.

    01 Mar 2010
    1. User avatar

      Zed Yap [Atlassian]

      Hi,

      The configuration Wizard will only shown upon the first access to Confluence page. I would suggest you to follow this documentation for the migration process:

      To install Confluence with MySQL you can try this documentation:

      Hope that helps.
      Best rgds,
      Zed

      01 Mar 2010
      1. User avatar

        Anonymous

        Thank you Zed!  By pouring over the documentation, I found that I had not cleared my localhost port 8080. 

        Support help me do it so I am now at the set stage that corresponds to this instructional page.  The link you kindly provid

        though is for Windows.  Is there an equivalent guide for Mac?  Also, I'm using XAMPP to turn Tomcat and MySQL on and off.

        I heard this is discouraged.  (I would like to learn why, but more importantly, I'd love any suggestions on how to now

        ditch XAMPP without screwing up my Tomcat or MySQL installations..)

        Thanks again!

        -Jon

        02 Mar 2010
  22. User avatar

    Todd Katz

    I recently upgraded a personal Confluence from 3.0.1 to 3.1.1 on my Mac and decided to set up MySQL 5.1.44-osx10.6-x86_64 as the database server. I've no idea if the issues I ran into apply only to my system or more generally but I found that after installing Confluence and associating it with the default MySQL database created by the Confluence installer I wasn't able to gain access to the Plugin Repository or even install plugins (like Themebuilder) manually. :(

    The apparent recommended fix (gleaned via Google) was to increase the packet size of the mySQL server from the default 1M to 32M. However to do this it seemed necessary to change the owner/group of the mysql "data" directory from "_mysql" to "root", shutdown the database via the mysqladmin utility and then run the following command as root:

       mysqld --user=root --max_allowed_packet=32M

    Then change the owner of the "data" directory back to "_mysql".

    After that it was easy to restart the mySQL server using the Mac Control panel and manually load the plugins I need.

    Finally, I wonder about running the database server as "root"; from a security aspect it's not ideal. Next time around I'll try creating the MySQL instance with an owner and group of "mysql" and see how it goes.

    03 Mar 2010
  23. User avatar

    Todd Katz

    Also, under OS 10.6 I could not locate a "MySQL Server Instance Config Wizard" (described in the doc on this page). And the options and location of options in the MySQL Administrator application did not match the documentation above and seemed to be a subset of what is available on PCs.

    In the absence of accurate stepped instructions for the GUI side in hindsight it would be faster and easier to treat the Mac as a variation of a UNIX or Linux system and work entirely through the command line as far as set-up is concerned.

    03 Mar 2010
  24. User avatar

    Anonymous

    These instructions are for MySQL Tools which are no longer available on MySQL site. Are there updated instructions for using MySQL workbench 5.2 on windows?

    Thanks,

    Dan

    12 May 2010
    1. User avatar

      Azwandi Aris [Atlassian]

      Hi, Dan. I have filed a request for our technical writers to review. Thanks for the suggestion.

      14 May 2010
  25. User avatar

    Anonymous

    Thanks Azwandi,
    I setup MySQL database with the above settings using MySQL command line but when I start confluence setup wizard after putting in my Standard JDBC settings I get the following errors:

    • Configuring the database failed. Couldn't create the database schema.
    • com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up

    Here are some notes on my environment:

    • 1. I'm using the default value for driver class name: com.mysql.jdbc.Driver
      2. I'm using the default database URL: jdbc:mysql://localhost/confluence?autoReconnect=true
      3. I've verified my MySQL permissions for the user name and verified the password.
      What other connection troubleshooting steps can I take?
      Thanks,
      Dan
    18 May 2010
    1. User avatar

      Klaus K.

      I am using jdbc:mysql://127.0.0.1:3306/confluence?autoReconnect=true and it´s working !

      22 Sep 2011
  26. User avatar

    Anonymous

    Figured it out. Port 3307 (not the default mySQL port) I was using needed to be specified in the JDBC URL during intial confluence set-up. It would be nice if that's put somewhere in the documentation.

    Dan

    20 May 2010
  27. User avatar

    Dan Wendling

    I'm unable to transfer this documentation to MySQL Workbench, the new mechanism for set up. Please update your documentation.

    These are your current steps I can't get past, do you have any advice?

    1. Right-click on the username 'confluenceuser' in the left pane and choose 'Add host from which the user can connect' from the pop-up menu.
      (info) If prompted to enable the global 'Show hosts in user list' option, choose 'Yes'.
    2. Enter the host name 'localhost' and click 'OK'.
    3. Click on 'localhost' within 'confluenceuser' in the left pane. (You might need to click on the name 'confluenceuser' first).
    4. Click the 'Schema Privileges' tab and then click 'confluence' in the 'Schemata' list.
    5. Make sure that 'confluenceuser@localhost' has all privileges assigned to them by clicking the '<<' button to move the privileges from the 'Available' to the 'Assigned' list and click 'Apply changes'.
      (info) To support international languages in Confluence, you should verify the newly created database is using UTF-8 encoding and re-examine the JDBC URL settings (configured in Stage 3).

    From Confluence setup, database configuration: The following error(s) occurred:

    • Configuring the database failed. Couldn't create the database schema.
    • com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
    04 Jun 2010
    1. User avatar

      Joachim Ooi [Atlassian]

      Hi Dan,

      A few clarification that is needed from you here:

      1. Is this a Standalone or EAR/WAR type of Confluence installation?
      2. Which Confluence version that you are installing?
      3. What type of connection are you trying to establish? (Direct JDBC or Datasource)?

      com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.

      Based on this error message above, this shows that you have problems connecting to your MySQL database. Usually, we will need the latest Confluence logs to check on what would be the root cause of it as the full logs will show more informative and descriptive stack trace.

      If you have further questions/problems, feel free to raise a support ticket at:

      Cheers,
      Joachim

      06 Sep 2010
  28. User avatar

    E P

    If you are currently using the "Confluence Standalone using the Mac OS X Evaluation Installer" version of Confluence then you need to first install "Confluence Standalone on Mac OS X from Zip File".

    In MySQL Workbench, I created a new connection (to 'confluence') and set up users called 'root', 'confluenceuser' and 'admin'. However, it seems all you need to do is follow the installation instructions on "Installing Confluence Standalone on Mac OS X from Zip File". The configuration of the external database stage of the "Confluence Setup Guide" has settings for creating a database that uses innodb and that screen also gives you the syntax for also adding utf-8 support (Step 5). The only odd aspect was the user name needed to be 'root' for it to work.

    If you have already created spaces in the evaluation version then you will need have to backed them up in the eval version. You then restore them in the standalone version (steps 6 & 7 of "Confluence Setup Guide")

    15 Nov 2010
    1. User avatar

      Sarah Maddox [Atlassian]

      Hallo Ellis

      Thank you, that is very useful feedback. I have created a documentation issue: CONF-21263. I've also linked it to another issue, CONF-13886, which one of the technical writers is currently working on.

      (We do have the guide to migrating to another database, but it does not cover your specific use case.)

      Cheers
      Sarah

      16 Nov 2010
  29. User avatar

    Anonymous

    It's likely everything I need to know about the quality of your product is reflected in this error-filled and error-prone setup procedure, so I'll just stop here. I just wanted to try the application, I don't want to waste hours debugging your setup instructions. I wonder if you realize how much business you lose at this stage. I was particularly disappointed when I saw that I needed to set InnoDB as default storage globally. It makes me think the rest of your application is equally hacky.

    27 Dec 2010
    1. User avatar

      Anonymous

      With MySQL 5.5, InnoDB is the default storage engine out of the box.

      20 Jan 2011
  30. User avatar

    Anonymous

    I can not start MySQL service when I select utf8_bin as default collation.  When I dont select a default collation it will start but cant add new users.  Error while storing the user information.  The user might have been deleted.  Please refresh the user list. and then get message: save user:  error adding new user entry.

    I assume they are related.

    10 Feb 2011
  31. User avatar

    Roger Smith

    When are you folks going to update these instructions for MySQL 5.5?????

    The MySQL version represented above is way beyond EOL and not even available anymore except through unsupported archives.

    05 Mar 2011
  32. User avatar

    Ajay Goel

    1. If you get the following exception after restart, follow the instruction below:
      MySQL isolation level 'REPEATABLE-READ' is no longer supported. Isolation level must be 'READ-COMMITTED'.  level
    2. Change isolation level bey editing your MySQL config file (usually /etc/my.cnf)
    3. Restart MYSQL
    4. Restart Confluecne
    16 Mar 2011
    1. User avatar

      Anonymous

      Thank's for that. Very helpful :-)

      worked perfectly

      16 Mar 2011
      1. User avatar

        Anonymous

        thanks

        29 Apr 2011
  33. User avatar

    Anonymous

    Will this change effect other databases in any negative way?

    17 Mar 2011
  34. User avatar

    Anonymous

    Hi everyone, do you know if it is possible to specify the database connection isolation level for Confluence 3.5 WITHOUT changing it on the mysql server? For Confluence 3.4.9, I did it in the confluence.cfg.xml file by placing in it the following line: <property name="hibernate.connection.isolation">2</property>. This set the Isolation property to READ-COMMITTED. However, whenever i use this same config file for 3.5, it complains that I'm not using READ-COMMITTED. Has anyone have this issue? Thanks in Advance!!!

    Eddie

    21 Mar 2011
    1. User avatar

      Richard Atkins [Atlassian]

      Hi Eddie,

      That change should have worked, but the validation code confluence is running (to check that the hibernate connection settings in the cfg.xml really work!) doesn't use this property when it does its isolation level check. I've raised http://jira.atlassian.com/browse/CONF-22071 to make Confluence automatically use this isolation setting, and http://jira.atlassian.com/browse/CONF-22073 to allow you to override this setting in the cfg.xml again and pass the bootstrap check.

      23 Mar 2011
      1. User avatar

        Anonymous

        Yes - this would be very nice! Messing with a live database with multiple other database is never fun. 3.4.9 worked and 3.5 doesn't and now I am stuck in limbo between 3.4.9 and 3.5... :-( I guess I have to restore the complete database to get back old avatars etc... Please don't take this personally but all Atlassian products SUCK when it comes to upgrading them. Sad, sad, sad...

        28 Mar 2011
    1. User avatar

      Anonymous

      Confluence check transaction isolation with query:

      show global variables where variable_name = 'tx_isolation'

      But hibernate.connection.isolation set only tx_isolation for session, so confluence use wrong method.

      23 Mar 2011
  35. User avatar

    Anonymous

    I'm having trouble getting an inital mysql DB setup.  I can connect just fine from the command line but the setup fails to connect.  I see these in the logs:

    2011-03-29 16:02:03,265 ERROR [http-8090-1] [atlassian.config.bootstrap.DefaultAtlassianBootstrapManager] getTestDatabaseConnection Could not s
    uccessfully test your database:
     -- referer: http://omega-swdev2.bbn.com:8090/setup/setupstandarddb-start.action?database=mysql | url: /setup/setupstandarddb.action | userName
    : anonymous | action: setupstandarddb
    com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 tim
    es. Giving up.
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
            at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
            at com.mysql.jdbc.Util.getInstance(Util.java:381)
            at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1012)
            at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:986)
            at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:981)
            at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
            at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2409)
            at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:784)
            at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
            at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
            at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:354)
            at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:284)
            at java.sql.DriverManager.getConnection(DriverManager.java:582)
            at java.sql.DriverManager.getConnection(DriverManager.java:185)
            at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.getTestDatabaseConnection(DefaultAtlassianBootstrapManager.java:347)
            at com.atlassian.confluence.setup.actions.SetupStandardDatabaseAction.execute(SetupStandardDatabaseAction.java:31)
            at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168)
            at com.atlassian.confluence.setup.actions.SetupCheckInterceptor.intercept(SetupCheckInterceptor.java:27)
            at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
            at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
            at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
            at com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.intercept(DefaultWorkflowInterceptor.java:55)
            at com.atlassian.confluence.core.ConfluenceWorkflowInterceptor.intercept(ConfluenceWorkflowInterceptor.java:35)
            at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
            at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
    -More-(7%)

    Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

    The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
            at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
            at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1119)
            at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:343)
            at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2331)
            ... 188 more
    Caused by: java.net.ConnectException: Connection refused
            at java.net.PlainSocketImpl.socketConnect(Native Method)
            at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
            at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
            at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
            at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
            at java.net.Socket.connect(Socket.java:529)
            at java.net.Socket.connect(Socket.java:478)
            at java.net.Socket.<init>(Socket.java:375)
            at java.net.Socket.<init>(Socket.java:218)
            at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:253)
            at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:292)

    I'm running CentOS 5.5 with mysql 5.0.77.  I'm at a loss at what to try next.

    Thanks.

    29 Mar 2011
    1. User avatar

      Anonymous

      I have the same issue on OSX and Windows, driving me nuts to get it working. Wasted so much time on just this that I opened a ticket for some help.

      08 Apr 2011
      1. User avatar

        Michael Brinson

        Did you ever get any assistance on this?  I'm having the same issue.

        21 Jun 2011
        1. User avatar

          Michael Seager [Atlassian]

          Michael,

          You're best off creating a support ticket so we can look into it further, please ensure you add the support zip from Confluence Admin > Atlassian Support Tools (if using Confluence 3.5.x). Else, please see Working with Confluence Logs.

          21 Jun 2011
    1. User avatar

      Anonymous

      Have you created the crowd empty db schema in the server and given the permissions to the user confluence will use to access it?

      28 Sep 2011
  36. User avatar

    Clément Tamisier

    with chrome 10 the following section is strange:

    probably a css style apply

    confluence.home=c:/confluencedata mysql

    instead of 

    confluence.home=c:/confluencedata_mysql

    (In fact with chrome i can switch those 2 codes with an added button (by chrome)).

    22 Apr 2011
    1. User avatar

      Niraj Bhawnani

      Hi Clément, it looks like in Chrome under certain environments the vertical height of the text in that block is too much causing it to have a tiny scrollbar. The text should still copy and paste just fine, though.

      27 Apr 2011
      1. User avatar

        Clément Tamisier

        Yes but i can see both code.

        firstly i see "confluence.home=c:/confluencedata mysql" (wihout underscore), when i click down i see "confluence.home=c:/confluencedata_mysql" and click up go back to "confluence.home=c:/confluencedata mysql",etc...

        with inspector is I switch on/off css of syntaxhighlighter I am able to get only "confluence.home=c:/confluencedata_mysql" (which is the good code)

        • line-height1.2em !important;

        It seems there is a bug somewhere no ?

        Clément

        27 Apr 2011
        1. User avatar

          Clément Tamisier

          Ah no sorry, I just understand what happen....

          there is no bug.

          27 Apr 2011
  37. User avatar

    Steve Goldberg

    This guide is now out of date. You should update it ASAP as it will cause undue support queries. I've just spent a few days back-and-forth with one of your support guys about this and it's only wasting our time (plus I now have no idea how to complete my installation).

    02 May 2011
    1. User avatar

      Niraj Bhawnani

      Hi Steve. Thanks for letting us know. I had a look at your support case and it looked like you were having trouble with the MySQL Administrator tool, which is no longer maintained by MySQL. I've updated the instructions so that it no longer includes using that tool.

      03 May 2011
      1. User avatar

        Steve Goldberg

        Thanks for doing that, Niraj. So - just to check - the instructions that are now included in this page are complete and cover all of the required steps? I can't check until I get home but the problem I am having is trying to 'translate' the old instructions into new ones.

        03 May 2011
        1. User avatar

          HengHwa Loi [Atlassian]

          Hi Steve,

          The instructions in this documentation covered all the standard setup procedure for Confluence to use MySQL as database.

          I would suggest you to go ahead with the installation/upgrade, should you encounter any issue, feel free to raise a support ticket.

          Regards,
          HengHwa

          12 May 2011
  38. User avatar

    Brooke Smith

    re: Character Sets in *Install MySQL Server* what is specified isn't correct for 5.5 as others above have so daintily commented.  I used the following instead.  I'm no expert so feedback welcome on if this is a correct substitue.

    Cheers,

    Brooke

    12 May 2011
  39. User avatar

    Ronald de Vries

    I can confirm that the suggested settings for "default-collation" and "default-character-set" don't work on MySQL 5.5.11 when using the mysql-5.5.11-win32 installer.

    There is another issue to watch out for. This installed sets the "innodb_buffer_pool_size=<value>" to 2G on systems with Windows 7 -64bit installations and large memory (I have 8GB) on them. This will stop the server from starting once you are editing the my.ini file. If you set that back to 1G, the server will start fine.

    Have not found a place to report this back to Oracle yet, guess they can learn something from Atlassian and its feedback mechanism on their documentation!.

    GO COMMUNITY FEEDBACK! Oracle, take a peek on how it's done.

    29 May 2011
  40. User avatar

    Anonymous

    For confluence3.5, When i have restored an XML backup created on 2.7.4, I'm unable to login to confluence saying "not permited".

    In Mysql database, I have noticed, the XML backup restoring users into two tables cwd_user and users tables. Is this is expected?

    Pls, guide me thru.

    Regards,

    Hari

    07 Jul 2011
    1. User avatar

      Anonymous

      Just noticed the New user management with 3.5

      New user management in Confluence 3.5 and later
      • Confluence now uses the CWD_USER table in the database to store and refer to its users.

      From the documentation, the usres from the users table are expected to be copied into cwd_user , though it got copied, i still see the users table, I'm unable to login

      07 Jul 2011
      1. User avatar

        Niraj Bhawnani

        Hi Hari,

        Can you create a support request at https://support.atlassian.com/? Our support engineers would be happy to help you diagnose and fix the problem.

        Regards,

        Niraj.

        11 Jul 2011
  41. User avatar

    Anonymous

    Hi,

    Is it possible to access any database from an external server for confluence? I am not the admin for my company's Wiki, I am just a user. Please help!!

    17 Aug 2011
    1. User avatar

      Niraj Bhawnani

      Do you mean you want to access an external database from within Confluence? If so you will need your administrator to set up that database as a datasource in Tomcat's server.xml file and then you can use a 3rd party plugin like the SQL Plugin to query that database and display the results on a page.

      18 Aug 2011
      1. User avatar

        Anonymous

        Thanks for the reply Niraj, that is exactly what I want to do, but is it possible to add more than 1 datasource because my

        company is already using another database for some other purposes and my department wants to manage and use a difreent 

        database.

        22 Aug 2011
        1. User avatar

          Niraj Bhawnani

          Tomcat does allow you to configure multiple data sources. You can refer to the Tomcat documentation on how to do so.

          23 Aug 2011
  42. User avatar

    Anonymous

    The installation sequence is wrong. you first install MySQL (external databasE) and then confluence. If you install confluence first then you are stuck where it says configure with external database.

    25 Sep 2011
  43. User avatar

    Anonymous

    This is ridiculous. this is simply impossible to setup. Or more accurately you have to spend hours upon hours to setup this thing.

    25 Sep 2011
    1. User avatar

      Michael Seager [Atlassian]

      Anonymous + others who are having trouble setting up Confluence with MySQL - if you're stuck please create a support ticket at http://support.atlassian.com so we can help you through it. We're not DBA's so we may not be able to help with specific MySQL issues, but we should be able to help get Confluence up and running.

      On a sidenote, I've personally found using PostgreSQL much easier than MySQL. If you're not tied to MySQL and want another free alternative, it's highly recommended.

      26 Sep 2011
  44. User avatar

    Anonymous

    I also lean towards simply getting rid of MySQL in favor of PostgreSQL, since that has working authentication schemes (doesn't treat IP addresses as strings, etc)

    06 Oct 2011
    1. User avatar

      Dick Visser

      We use IPv6 only networking for our databases, which are all PostgreSQL. Currently our Conlfuence and JIRA instances are the only ones left that run MySQL.

      When I'm done migrating to Confluence 4.0.x and it has been running stable for a few weeks I will switch from MySQL to PostgreSQL.

      02 Nov 2011
  45. User avatar

    Leo von Klenze, TNG Technology Consulting GmbH

    You can also set the isolation level in the jdbc-URL:

    or, if you already set the storage engine, separate it by a comma:

    24 Oct 2011
    1. User avatar

      Anonymous

      In XML you need to set it like

      &amp;sessionVariables=tx_isolation='read-committed'
      11 May 2012
  46. User avatar

    Leandro Garcia

    Hi,

    I have been checking your comments and the instructions, and I still have some doubts:

    • The parameters that are going to be applied are parameters for the engine, this is not like the JIRA's configuration that is configured in the database creation.As we are modifying the instance, how far does this affect the other product installation? (In most of the places we cannot have one instance for each installed product)
    • Is there a way to do this configuration just for the Wiki?
    • Could you please WARN somewhere in the JIRA installation guidelines, to install the database with the configuration for Confluence? or at least try to merge both configuration to avoid side effects when someone wants to put in production another Atlassian Application.

    In my personal opinion, I never thought that the installation of a Wiki (Confluence) would be more difficult than a tracking system (JIRA).

    Thanks and regards,

    09 Dec 2011
    1. User avatar

      Niraj Bhawnani

      Hi Leandro,

      • These configuration parameters don't conflict with any other Atlassian products, so you can have the same MySQL instance server as the database server for JIRA and Confluence. You may encounter problems with non-Atlassian products that expect a different configuration, though.
      • Everything except "max_allowed_packet" can be set in the session scope in MySQL. Which means the other configuration can be done in the connection string, but "max_allowed_packet" must be set globally in the server configuration file.
      • I'll bring the inconsistencies to the attention of our documentation team, thanks.

      Hope this helps,
      Niraj.

      05 Jan 2012
    1. User avatar

      Niraj Bhawnani

      FYI, I've raised a JIRA issue to track this request: CONF-24362 - Consolidate MySQL setup documentation Closed

      09 Jan 2012
  47. User avatar

    Anonymous

    After another highly frustrating effort to get mySQL, Confluence, and Mac Lion to successfully run together I finally took Atlassian's advice and switched to Postgres. That worked!

    I've removed mySQL accordingly and have Confluence running on my personal Mac again.

    Thanks, Atlassian!

    10 Dec 2011
  48. User avatar

    Anonymous

    Looks like the settings advised to use in my.cnf are now deprecated... Prolly need to update the docs.

    111223 9:23:47 [Warning] '--default-collation' is deprecated and will be removed in a future release. Please use '--collation-server' instead.
    111223 9:23:47 [Warning] '--default-character-set' is deprecated and will be removed in a future release. Please use '--character-set-server' instead.
    OK
    Filling help tables...
    111223 9:23:48 [Warning] '--default-collation' is deprecated and will be removed in a future release. Please use '--collation-server' instead.
    111223 9:23:48 [Warning] '--default-character-set' is deprecated and will be removed in a future release. Please use '--character-set-server' instead.
    OK

    23 Dec 2011
    1. User avatar

      Niraj Bhawnani

      We added both the old and new versions to simplify the docs and allow the instructions to work on both older and newer versions of MySQL. Feel free to remove the "default-collection" and "default-character-set" entries if the warnings bother you.

      05 Jan 2012
      1. User avatar

        Anonymous

        On MySQL 5.5.18 on Fedora 16 the instructions above will fail:

        120126 11:13:34 [ERROR] /usr/libexec/mysqld: unknown variable 'default-character-set=utf8'

        120126 11:13:34 [ERROR] Aborting

        :x:

        26 Jan 2012
        1. User avatar

          Niraj Bhawnani

          Thanks for reporting this. I've updated the documentation to reflect this (smile)

          01 May 2012
  49. User avatar

    Sysret Kastrati

    I am facing similar problems with the "max_allowed_packet. Although setting the value in my.cnf to 100M it does not save or consider it.

    And also doing following:

    • set global max_allowed_packet = 1000*1024*1024;

    does note change it.

    Outcome of 

    • select @@max_allowed_packet

    shows always 1048576

     

    15 Jan 2012
    1. User avatar

      Niraj Bhawnani

      Hi Sysret,

      Have you tried setting it to 32M in my.cnf? Confluence shouldn't need it set to a higher value, though the MySQL documentation says it can be set as high as 1GB. The documentation also says that it cannot be set at runtime:

      As of MySQL 5.0.84, the session value of this variable is read only. Before 5.0.84, setting the session value is permitted but has no effect.

      16 Jan 2012
  50. User avatar

    Ryan Goodwin [Atlassian]

    I wanted to add some things which I found during my configuration of MySQL 5.5 (OS X 10.6):

    • MySQL 5.5 has some differences in the configuration variables. transaction-isolation is now tx-isolation
    • In order to get my homebrew installation of MySQL 5.5 to pickup the .my.cnf file, I had to name it .my.ini and leave in my user root folder (~)
    • If you continue to get errors when trying to start the server, there may be a startup parameter being specified that has been changed or deprecated in 5.5. Try commenting them out 1 by 1 to see if this alleviates the problem. The result when you try to start the server (using mysql.server start) will be tmp/mysql.sock error.

    Hope this helps someone!

    Ryan 

    24 Jan 2012
  51. User avatar

    Alan

    I was able to resolve the problem of:

    • Configuring the database failed. Couldn't create the database schema.
    • com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.

    By commenting out

    bind-address

    in my.cnf. It was advised to add this for external MySQL access.

    27 Mar 2012
    1. User avatar

      Ryan Goodwin [Atlassian]

      If you have a bind address, you'll need to use the machine IP address in the connection string in stead of localhost.  The bind-address is necessary for external access to the database.

      04 Jun 2012
  52. User avatar

    Scott Brown

    I can connect just fine but I cannot use the UPM.  It will not update.  I have log set to debug but I get no response.  I read it could be database set up by I can't find any other info.

    19 Jul 2012
    1. User avatar

      Ryan Goodwin [Atlassian]

      Hi Scott,

      I think we'll need to examine your specific instance. Please create a support request at http://support.atlassian.com and include a support.zip as described here so we can begin troubleshooting right away. 

      Troubleshooting Problems and Requesting Technical Support#CreatingaSupportZipFileviatheConfluenceAdministrationConsole

       

      19 Jul 2012
      1. User avatar

        Scott Brown

        I found it.  The MySql instance was not honoring the my.inf file.  MySql workbench was installing it in an odd location (that didnt exist), and that MySql doesnt look for.  In addition the windows service calls the config file from the command line launch.  Once I had it all lined up it worked perfectly.

        Thanks.

        20 Jul 2012
  53. User avatar

    Ravi Yadav

    We're currently facing the following problem:

    We're deploying the confluence 5.1.3 war into a tomcat 7.x which has a MySQL 5.2.x configured.

    When trying to start, the tomcat usually dies within 25 seconds due to some Hibernate-/JDBC-Exceptions:

    "2013-06-19 14:59:20,772 WARN net.sf.hibernate.util.JDBCExceptionReporter - SQL Error: 1146, SQLState:

    42S02
    2013-06-19 14:59:20,772 ERROR net.sf.hibernate.util.JDBCExceptionReporter - Table 'confluence.INDEXQUEU
    EENTRIES' doesn't exist
    2013-06-19 14:59:20,773 WARN net.sf.hibernate.util.JDBCExceptionReporter - SQL Error: 1146, SQLState:
    42S02
    2013-06-19 14:59:20,773 ERROR net.sf.hibernate.util.JDBCExceptionReporter - Table 'confluence.INDEXQUEU
    EENTRIES' doesn't exist"

     

    How is the initial database/schema setup triggered??

    19 Jun 2013
    1. User avatar

      Niraj Bhawnani

      Hi Ravi,

      Is this a fresh installation or have you configured Confluence to point to an existing home directory? It sounds like the schema is missing. Normally when pointed to an empty home directory Confluence will begin the setup process. If you're still having trouble, please raise a technical support request.

      19 Jun 2013
  54. User avatar

    Ravi Yadav

    Hi Niraj,

    Thanks for the swift answer!
    That seems to be the point!!

    Just for some background info:

    We're performing sort of a fresh install.

    The application is preconfigured and installed automatically on a pristine virtual machine.

    The accompanying database is empty as well at that moment.

    We're doing this in order to have a fully automated installation/deployment with no human interaction whatsoever required.

    20 Jun 2013
  55. User avatar

    Some Body

    Just wanted to confirm that as of MySQL v5.6 one does not need to set the `default-storage-engine` to INNODB in the MySQL my.cnf file given the InnoDB engine is the default engine in MySQL v5.6 and later; is that correct?

    21 Aug 2013
  56. User avatar

    Anton Markov

    CentOS release 6.4 (Final)

    Confluence 5.2.3

    Mysql (from Centos repo):

    mysql-server-5.1.69-1.el6_4.x86_64

    mysql-5.1.69-1.el6_4.x86_64

    mysql-connector-java-5.1.17-6.el6.noarch


    The  mysql-connector-java-5.1.17-6.el6.noarch is not working  (java.sql.SQLException: Unexpected exception encountered during query.)!
    The possible reason described here for stash (Cannot connect Stash to MySQL database) -

    This is a bug in MySQL driver 5.1.16 which causes an error in the connection when the JDBC URL has both "sessionVariables" and "characterEncoding" parameters at the same time (ie. url="jdbc:mysql://localhost:3306/stash131?autoReconnect=true&characterEncoding=utf8&useUnicode=true&sessionVariables=storage_engine%3DInnoDB")


    Use last connector from MySQL - it works smoothly
    wget http://downloads.mysql.com/archives/mysql-connector-java-5.1/mysql-connector-java-5.1.25.tar.gz

    cp mysql-connector-java-5.1.25-bin.jar /opt/atlassian/confluence/confluence/WEB-INF/lib/

     

     

    01 Sep 2013
  57. User avatar

    Matt Doar [ServiceRocket]

    Lachlan Lachlan, why the change in recommended  size from 32M to 34M for max_allowed_packet? Just curious

    03 Dec 2013
    1. User avatar

      Lachlan Dally

      Hi Matt, this is to allow the installation of the Gliffy add-on, which recently grew to > 32M and is the largest known add-on at the moment.


      Cheers,
      Lachlan

      05 Dec 2013
      1. User avatar

        Matt Doar [ServiceRocket]

        Good to know. Does that mean that everyone using MySQL who wants to update their Gliffy (for JIRA only) should change that value?

        06 Dec 2013
  58. User avatar

    David Peter

    I getting an error

    The following error(s) occurred:

     
    • Could not find driver with class name: com.mysql.jdbc.Driver

    during the step: http://localhost:8090/setup/setupdbchoice.action

    When installing Confluence . I have teh Mysql drive installed in:

    /opt/atlassian/confluence/confluence/WEB-INF/lib

     

    as instructed.. What the problem..

    12 Jan 2014
    1. User avatar

      Ryan Goodwin [Atlassian]

      I would double check that the driver jar has the correct permissions on it for read/write access by the confluence service. You also need to have it there before starting confluence. Try stopping Confluence and restarting the installation.

      12 Jan 2014
  59. User avatar

    David Peter

    Thanks for the quick response Ryan..  The problem was that I need to 'stop' and 'restart' Confluence

     

     

    12 Jan 2014
  60. User avatar

    David Peter

    Ok  I'm back.. 

    I get the following error when installing Gliffy

    An error occurred while installing the add-on. Configure your MySQL server with a higher max_allowed_packet as described in Database Setup for MySQL.

    mysql my.cnf has teh following under [mysqld]

    max_allowed_packet=32M

    I have stop and started both mysql and conflucence

    Thanks

    12 Jan 2014
    1. User avatar

      Ryan Goodwin [Atlassian]

      Typical with most storage needs, Gliffy now requires ~34MB of space. I would suggest increasing the max_allowed_packet to 64MB. You'll need to restart MySQL to pick up the changes in the config file. 

      13 Jan 2014
  61. User avatar

    Greg Huston

    Hi,

    Just a note for users here... I had some problems installing this. I'm not terribly tech saavy but I managed to work through it. My most annoying problem was confluence not connecting to the database. The errors I kept getting were the same as other users...

    • Configuring the database failed. Couldn't create the database schema.
    • com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.

    The problem was that confluence was trying to connect as 

    confluence@domainname.com

    instead of confluence@localhost

    I couldn't find where to change that so I ended up changing that on the Mysql end. Really annoying not sure why it's like that but apparently it is. 

     

     

    18 Apr 2014
  62. User avatar

    a.nagel

    Where can I find these JDBC drivers?? This page redirects me to Database JDBC Drivers which redirects me back here. Where can I download the JDBC MySQL drivers??

    30 Apr 2014
    1. User avatar

      Lachlan Dally

      Hi there,

      The link to the MySQL driver is: https://dev.mysql.com/downloads/connector/j/

      I've updated the Database JDBC Drivers page to be clearer about this.

      01 May 2014
  63. User avatar

    sri flur

    Hi,

    I am following the mysql method, I see the below error at the setup database step

    Setup Database Failed

    • Configuring the database failed. Couldn't create the database schema.
    • Schema creation complete, but database tables don't seem to exist.

      How to resolve this?
    02 Jul 2014
    1. User avatar

      Lachlan Dally

      Hi Sri,

      It's hard to tell why this is happening from looking at just that error message. Please raise a request with Atlassian Support and attach the logs ({{<confluence_home>/logs/atlassian-confluence.log}}) from your instance to the ticket so we can help you resolve this issue.

      Thanks,
      Lachlan

       

      03 Jul 2014
  64. User avatar

    Eli Bishop [Atlassian]

    It's been brought to our attention that there's another MySQL configuration issue specific to MySQL 5.6.20 (referenced here under "InnoDB Notes") that requires also increasing the value of innodb_log_file_size. We're still testing to determine the optimum setting for this and we'll update this page accordingly (as well as the Knowledge Base) but I figured I ought to mention it here ASAP.

    05 Sep 2014
  65. User avatar

    Christian Marth

    It seems in confluence 5.6.1 when going through configuration of a new install there is no option to configure a database, after entering licence details it takes me straight to user management?

    18 Sep 2014
    1. User avatar

      Matt Ryall [Atlassian]

      Apologies, Christian – we introduced a bug in the Confluence setup wizard in Confluence 5.6.1 that prevents you setting up an external database when using an evaluation license:  CONF-34288 - Confluence defaults to HSQLDB when using evaluation license Resolved

      The bug is fixed in Confluence 5.6.2, to be released shortly. A workaround in the meantime is to either try Confluence 5.6, or use a starter license or commercial license.

      Update: accurate version numbers.

      18 Sep 2014
      1. User avatar

        Christian Marth

        Thanks Mate, Working now, bought the starter licence...

        19 Sep 2014
  66. User avatar

    Neil Nelson

    I have installed Confluence by unpacking atlassian-confluence-5.6.1.tar.gz.  I have MySQL 5.5.31-0ubuntu0.12.04.1 running and JIRA 6.2.1 has no trouble communicating with MySQL.  I created the 'confluence' database with "create database confluence character set utf8 collate utf8_bin;" and "grant all privileges on confluence.* to 'confluenceuser'@'localhost' identified by '<password>';".  Confluence and MySQL are running on the same machine.

    I am unable to get Confluence to connect to the database.  During the setup phase I am getting:

    Setup Database Failed

    The following error(s) occurred

     
      • Configuring the database failed. Couldn't create the database schema.
      • com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

    Setting up database instance failed. You can either try it again or or go back to the database selection page:

    I need help, please, in resolving this.  I don't see any obvious indication in atlassian-confluence.log of what the problem could be.

    30 Sep 2014
    1. User avatar

      Rachel Robins [Atlassian Tech Writer]

      Hi Neil, I'd suggest contacting support about this one.  I've not seen this error before, but I'm sure they have and will be able to help you get up and running. 

      30 Sep 2014
      1. User avatar

        Neil Nelson

        Thank you, Rachel.  I will contact support.  Actually, I thought that that was what I was doing, but I guess I put it in the wrong place.

        01 Oct 2014
  67. User avatar

    Jean-Claude De Giorgi

    Hi,

    Is there a tutorial on how to configure MySQL for Linux as mentioned in the "Run the MySQL installation wizard" part ?

    Thank you for giving more information for that OS.

    Regards,

    Jean-Claude

    22 Oct 2014
    1. User avatar

      Stephen Brannen [Atlassian]

      Howdy Jean-Claude,

      Other than the instructions on this page for setting up MySQL to work with Confluence, we don't have any other documentation on setting up a MySQL instance. You could refer to DigitalOcean's Basic MySQL Tutorial, they make pretty good step by step setup guides for things like this.

      Cheers,
      Stephen Brannen | Confluence Support

      22 Oct 2014
      1. User avatar

        Jean-Claude De Giorgi

        Hi Stephen,

        Thanks for your reply.

        I am a bit concerned about the Enable TCP/IP Networking and Enable Strict Mode options. I roughly Googled it, but could not find anything interresting. Is it only for Windows?

        Jean-Claude

        22 Oct 2014
        1. User avatar

          Stephen Brannen [Atlassian]

          Jean-Claude,

          MySQL can be installed on most operating systems. If you have more questions on configuring MySQL to work with Confluence or just in general you could ask the community at [Atlassian Answers|http://answers.atlassian.com]

          Cheers,
          Stephen Brannen | Confluence Support

          23 Oct 2014
  68. User avatar

    Jared Campbell

    I attempted to upgrade from 5.6.5 to 5.7.3 and one of the new settings on this page was increasing the innodb_log_file_size variable in MySQL.  I shutdown the MySQL service, modified the my.cnf file to include the new variable, and restarted the MySQL service only to receive this error:

    Starting MySQL. ERROR! The server quit without updating PID file (<path-to-mysql-pid>)

    After banging my head against this error I found that it occurred not because of the PID, but because MySQL won't start if the stored InnoDB log files are a different size then the innodb_log_file_size setting.  After shutting down the service the existing InnoDB log files need to be moved or deleted before restarting the MySQL service.

    Credit to http://spin.atomicobject.com/2011/05/09/mysql-failed-registration-of-innodb-as-a-storage-engine/

    This information would be useful in the documentation of MySQL settings for Confluence.

    16 Apr 2015
    1. User avatar

      Deividi Luvison [Atlassian]

      Hey Jared,

      As this is an issue with MySQL itself instead of confluence, I've added that information into our knowledge base for MySQL issues so more users can be aware of that:

      https://confluence.atlassian.com/display/CONFKB/Known+Issues+for+MySQL#KnownIssuesforMySQL-MySQLFailstostartwithserverquitwithoutupdatingPIDfile

      Thanks a lot for your input regarding this error problem.
      Thanks and Regards,
      David|Confluence Support Engineer
      21 Apr 2015
Powered by Confluence and Scroll Viewport