Configuring your MySQL database and preparing it for Confluence/Jira

Let’s go ahead and get started with the database. First, you need to find out what your randomly generated password is.

grep ‘temporary’ /var/log/mysqld.log

Well, need to use that password in just a sec. Log in to the database with the following command.

mysql -u root -p

Once you enter the password that you just coppied, you can connect to your database. First thing that were going to do with your database is change the root password. (I did it already)

ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘<your-new-password>’;

flush privileges;

exit

Since you exited that session, lets log back into using the same account but with the new password.c

CREATE DATABASE <database-name> CHARACTER SET utf8 COLLATE utf8_bin; 

show database; 

Next were going to create the user that confluence or Jira will use to access the database from the APP server.  NOTE: If you have not setup the app server do not proceed until after you have configured the application server. 

After creating the user and setting up the privileges,  we can continue on to the server app itself. 

GRANT ALL PRIVILEGES ON <database-name>.* TO '<user>'@'<appserverip>' IDENTIFIED BY '<password>'; 

Finally we need to edit the my.cnf files and then we can move on to creating the application server for Jira or confluence. (in this case, were creating a confluence server.) 

# For advice on how to change settings please see
http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html

[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

transaction-isolation=READ-COMMITTED #add this line at the bottom of your config 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s