MySQL56 SLES11 Installation

From GWAVA Technologies Training
Revision as of 20:11, 18 August 2017 by Stephanf (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Installing MySQL 5.6 on SLES 11.3

  1. Create a directory and download it md /software/mysql directory and change to it
  2. download MySQL Community Server 5.5 [1] direct [2] or 5.6[3] direct [4] to that mysql directory

Contents

Unzip MySQL

Unzip the MySQL package: tar –xvf MySQL-5.6.33-1.sles11.x86_64.rpm-bundle.tar

Install the MySQL server and client

Install with rpm:

  • rpm –ivh MySQL-client-5.6.33-1.sles11.x86_64.rpm
  • rpm –ivh MySQL-server-5.6.33-1.sles11.x86_64.rpm

Changing the Data Directory for MySQL (optional)

By default the location of the MySQL will be installed to the /var/lib/mysql directory. If you wish to change where the database is installed, follow these instructions. If not skip this step.

To change the data directory for MYSQL follow these steps:

  • Create a directory where you want the MySQL database stored.
  • Start MySQL.

MySQL will create the database files in the default location found in /var/lib/mysql directory.

  • Stop MySQL
  • Copy all of the MySQL files from the /var/lib/mysql directory to the new directory that was created.
  • Edit the my.cnf file. This is usually found in the /etc directory.
  • Locate the section [mysqld] and underneath type in:
             datadir=[new directory path]

Note: If the my.cnf file does not exist create it and add in the [mysqld] section with the datadir=[new directory path] below it.

  • Change the ownership rights for the newly created directory to mysql: chown –r mysql:mysql /directory
  • Start MySQL. service mysql start

Change Root Password in MySQL (Post-Installation)

After the installation, MySQL 5.6 will create a random password for the root user. The password is found in a file in the home directory.

To access this file type: cd [ENTER]. This will take you back to the home directory.

Then type: cat .mysql_secret. This will display the random password. You will need this to change the root password.

To change the root password follow these steps: [5]

  • Start MySQL rcmysql start
  • Type: mysql_secure_installation
  • Enter in the password that you got from the /root/.mysql_secret file.
  • When it asks to change the password say yes, and make the change.
  • Proceed through the rest of the prompts and say yes to all of them.
  • Log into MySQL by typing: mysql –u root –p and type in the new root password.

Create a New User (Not Required)

You can use the root user and password for Retain. However, if you’d like to create a new user instead, follow these steps:

Log into MySQL: mysql –u root –p and enter in the password.

Type: use MySQL

Create a new user by typing in: create user ‘retainuser’ @’localhost’ identified by ‘password’;

Personal tools
Namespaces

Variants
Actions
Home
Exchange
GroupWise
JAVA
Linux
MTK
Retain
GW Monitoring and Reporting (Redline)
GW Disaster Recovery (Reload)
GW Forensics (Reveal)
GWAVA
Secure Messaging Gateway
GW Mailbox Management (Vertigo)
Windows
Other
User Experience
Toolbox
Languages
Toolbox