• USA : +1 973 910 5725
  • INDIA: +91 905 291 3388
  • info@tekslate.com
  • Login

MySQL Installation

2.1. Installing MySQL from RPM Packages on Linux

For non-RPM Linux distributions, you can install MySQL using a .tar.gz package.

MySQL-server-VERSION.glibc23.i386.rpm

The MySQL server. You need this unless you only want to connect to a MySQL server running on another machine.

MySQL-client-VERSION.glibc23.i386.rpm

The standard MySQL client programs. You probably always want to install this package to connect to the servers.

MySQL-devel-VERSION.glibc23.i386.rpm

The libraries and include files that are needed if you want to compile other MySQL clients, such as the Perl modules.

MySQL-shared-VERSION.glibc23.i386.rpm

This package contains the shared libraries (libmysqlclient.so*) that certain languages and applications need to dynamically load and use MySQL. It contains single-threaded and thread-safe libraries. If you install this package, do not install the MySQL-shared-compat package.

MySQL-shared-compat-VERSION.glibc23.i386.rpm

This package includes the shared libraries for MySQL 3.23, 4.0, and so on, up to the current release. It contains single-threaded and thread-safe libraries. Install this package instead of MySQL-shared if you have applications installed that are dynamically linked against older versions of MySQL but you want to upgrade to the current version without breaking the library dependencies.

2.2.  Installing MySQL from a Standard Source Distribution

 

Directory Contents of Directory
bin Client programs and scripts
Var Log files, databases
docs Manual in Info format
man Unix manual pages
Include/mysql Include (header) files
Lib/mysql Libraries
Libexec The mysqld server
share/mysql Miscellaneous support files, including error messages, sample configuration files, SQL for database installation
sql-bench Benchmarks

 

 

# Preconfiguration setup

shell> groupadd mysql

shell> useradd -g mysql mysql

# Beginning of source-build specific instructions

shell> tar zxvf mysql-VERSION.tar.gz

shell> cd mysql-VERSION

shell> ./configure –prefix=/usr/local/mysql

shell> make

shell> make install

# End of source-build specific instructions

# Postinstallation setup

shell> cd /usr/local/mysql

shell> chown -R mysql .

shell> chgrp -R mysql .

shell> bin/mysql_install_db –user=mysql

shell> chown -R root .

shell> chown -R mysql var

# Next command is optional

shell> cp support-files/my-medium.cnf /etc/my.cnf

shell> bin/mysqld_safe –user=mysql &

# Next command is optional

shell> cp support-files/mysql.server /etc/init.d/mysql.server

2.3  Installing MySQL from Generic Binaries on Unix/Linux

 

Directory Contents of Directory
bin Client programs and scripts
Var Log files, databases
docs Manual in Info format
man Unix manual pages
Include/mysql Include (header) files
Lib/mysql Libraries
Libexec The mysqld server
share/mysql Miscellaneous support files, including error messages, sample configuration files, SQL for database installation
sql-bench Benchmarks

 

shell> groupadd mysql

shell> useradd -r -g mysql mysql

shell> cd /usr/local

shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz

shell> ln -s full-path-to-mysql-VERSION-OS mysql

shell> cd mysql

shell> chown -R mysql .

shell> chgrp -R mysql .

shell> scripts/mysql_install_db –user=mysql

shell> chown -R root .

shell> chown -R mysql data

# Next command is optional

shell> cp support-files/my-medium.cnf /etc/my.cnf

shell> bin/mysqld_safe –user=mysql &

# Next command is optional

shell> cp support-files/mysql.server /etc/init.d/mysql.server

2.4  Setting  Environment  Variables

 

# vi .bash_profile

export MySQL_HOME=/usr/local/mysql

#PATH=$PATH:$HOME/bin

PATH=$PATH:$HOME/bin:$MySQL_HOME

export MYSQL_HOME=’localhost’

export USER=’localhost’                         Only on Win and Netware

export MYSQL_PWD=’localhost’

 

 

Summary
Review Date
Reviewed Item
MySQL Installation
Author Rating
5

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on MySQL Installation"

Leave a Message

Your email address will not be published. Required fields are marked *

Site Disclaimer, Copyright © 2016 - All Rights Reserved.