
Install HTTP Apache from source
1. Download source mysql-5.6.24-linux-glibc2.5-x86_64.tar.gz from http://dev.mysql.com/downloads/mysql/
2. Copy the downloaded file to folder where you want to install MySql, for my case I copied in /opt/soft-install/ directory
3. Extract the file at this location, command to extract
cp -av mysql-5.6.24-linux-glibc2.5-x86_64.tar.gz /opt/soft-install/ tar -zxvf mysql-5.6.24-linux-glibc2.5-x86_64.tar.gz mv mysql-5.6.24-linux-glibc2.5-x86_64 mysql-5.6
4. Go to the bin directory of the installation folder and run the following commands
cd /opt/soft-install/mysql-5.6/bin/ useradd -r -g mysql mysql cd /opt/soft-install/mysql-5.6/scripts/ ./mysql_install_db --basedir=/opt/soft-install/mysql-5.6 --datadir=/opt/soft-install/mysql-5.6/data --user=mysql cd /opt/soft-install/mysql-5.6 vi my.cnf
Here ensure that the path for basedir, datadir amd port is as per the installation requirements. For my case I have mentioned the below path and port
basedir=/opt/soft-install/mysql-5.6 datadir=/opt/soft-install/mysql-5.6/data port=3306
cd /opt/soft-install/mysql-5.6/bin/ ./mysqld --explicit_defaults_for_timestamp
I have also ensured that the below mentioned path is defined in the my_config.h header file in /opt/soft-install/mysql-5.6/include/my_config.h
#define DEFAULT_MYSQL_HOME "/opt/soft-install/mysql-5.6/" #define SHAREDIR "/opt/soft-install/mysql-5.6/share" #define DEFAULT_BASEDIR "/opt/soft-install/mysql-5.6/mysql" #define MYSQL_DATADIR "/opt/soft-install/mysql-5.6/data" #define DEFAULT_CHARSET_HOME "/opt/soft-install/mysql-5.6/mysql" #define PLUGINDIR "/opt/soft-install/mysql-5.6/lib/plugin" #define DEFAULT_SYSCONFDIR "/opt/soft-install/mysql-5.6/etc"
Here we are now now commands test/start/stop mysql installation
cd /opt/soft-install/mysql-5.6/support-files/ ./mysql.server start
Note : Always run this command as a root user
Click here for
- How to install HTTP Apache Server from source
- How to install PHP from source
- How to install PhpMyAdmin from source
Jkoder.com Tutorials, Tips and interview questions for Java, J2EE, Android, Spring, Hibernate, Javascript and other languages for software developers