- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Installing a MySQL Source Distribution
152 Lectures 16 hours
87 Lectures 5.5 hours
Let us understand how to install MySQL from a source distribution −
Building MySQL from source
You need the following tools to build and install MySQL from source −
GNU needs to be installed so as to uncompress the distribution. Another ‘tar’ should be installed to unpack the distribution.
ANSI C++ compiler.
A good ‘make’ program. GNU make is recommended
The below commands need to be executed to install a MySQL source distribution from an unpacked ‘tar’ file −
shell> configure shell> make shell> make install shell> scripts/mysql_install_db shell> /usr/local/mysql/bin/safe_mysqld &
If you start from a source RPM, then do the following.
shell> rpm −−rebuild MySQL−VERSION.src.rpm
This will ‘make’ a binary RPM that can be installed by the user.
New users can be added using the bin/mysql_setpermission script if DBI and Msql−MySQL−modules Perl modules are installed.
Let us understand the steps in detail −
To install source distribution, pick a directory where the distribution needs to be unpackged and move there.
The distribution file has to be obtained from one of the sites listed in ‘Getting MySQL’. MySQL source distributions are given as compressed tar archives.
The distribution needs to be unpacked into the current directory using the below command −
shell> gunzip < mysql−VERSION.tar.gz | tar xvf −
This would create a directory named `mysql−VERSION'.
The user has to change into top−level directory of the unpacked distribution using the below command −
shell> cd mysql-VERSION
The release has to be configured, and then compiled, using the below commands −
shell> ./configure −−prefix=/usr/local/mysql shell> make
When ‘configure’ is run, certain options can be specified. Install everything using the below command, and ensure that it is run as root −
shell> make install
MySQL grant tables need to be created if MySQL is being installed for the first time −
Once this is done, initialize and test the distribution to ensure everything works fine.
- Installing MySQL from Source
- Installing MySQL from source on linux
- Installing MySQL on macOS
- Installing MySQL on Linux
- Installing MySQL on Solaris
- Installing MySQL on FreeBSD
- Installing MySQL on Microsoft Windows
- Installing MySQL Using Unbreakable Linux Network (ULN)
- Which MySQL Version and Distribution to Install?
- Installing MySQL on Unix/Linux Using Generic Binaries
- How to convert a Kotlin source file to a Java source file?
- Replacing/Installing a license in SAP HANA
- Installing Linux Packages Inside a Docker Container
- Installing Python on Linux
- Installing Python on Windows