Here a list of useful commands to do installations of Atlassian tools in MySQL

Example for CentOS with yum ( install of MySQL client)

  1. At the command line of your instance, install wget:
    sudo yum -y install wget
    
  2. Install the MySQL client on the instance:
    sudo yum -y install mysql

Download MySQL Connector/J

Jira connects to a database using a JDBC database connection. The MySQL Connector is the official JDBC driver for MySQL. This example uses version 5.1.46 of the MySQL Connector.

  1. At the command line of your Jira instance, download the connector:
    wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.46.tar.gz
    
  2. Uncompress the tar file:
    tar -xzf mysql-connector-java-5.1.46.tar.gz
    
  3. Copy the file to /opt/atlassian/jira/lib:
    sudo cp ./mysql-connector-java-5.1.46/mysql-connector-java-5.1.46-bin.jar /opt/atlassian/jira/lib/.
    

 

Starting the MySQL session

This section shows how to create a MySQL user and password and how to create a MySQL database to connect Jira to during the setup process.

  1. At the command line of your instance, start a MySQL session: (change the IP to your IP…and the port)
    mysql -u root -p --host 127.0.0.1 -P 3306
    

    When the session is ready, you see the mysql prompt.

  2. Create the database. Substitute [DATABASE_NAME] for your database name.
    CREATE Database [DATABASE_NAME] CHARACTER SET utf8 COLLATE utf8_bin;
    
  3. Create a non-root user and set the user’s password. Replace [USERNAME] for your username and [PASSWORD] with your password.
    CREATE USER '[USERNAME]'@'%' IDENTIFIED BY '[PASSWORD]';
    
  4. Grant the user all privileges:
    GRANT ALL PRIVILEGES ON [DATABASE_NAME] . * TO '[USERNAME]'@'%';
    FLUSH PRIVILEGES;
    
  5. Close the MySQL session:
    EXIT;

 

JIRA and MySQL 5.6

JIRA and MySQL 5.7

Confluence and MySQL

Crowd and MySQL

MySQL Import/Export databases

A common use of mysqldump is for making a backup of an entire database:

shell> mysqldump db_name > backup-file.sql

You can load the dump file back into the server like this:

UNIX

shell> mysql db_name < backup-file.sql

The same in Windows command prompt:

mysql -p -u [user] [database] < backup-file.sql

PowerShell

C:\> cmd.exe /c "mysql -u root -p db_name < backup-file.sql"

MySQL command line

mysql> use db_name;
mysql> source backup-file.sql;

By MrAddon

 

Posted by:.

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 )

Facebook photo

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

Connecting to %s