cmdref.net - Cheat Sheet and Example

cmdref.net is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools


Sidebar








Cloud



Etc


Reference














.

middleware:db:mysql:install:source.html



MySQL

Installing MySQL from Source

Installing MySQL5

Creating Group and User

# groupadd mysql
# useradd -g mysql -s /sbin/nologin mysql

Installig

# yum install cmake
# yum install ncurses-devel
# yum install gcc-c++

Installing Mysql

# wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.14.tar.gz/from/http://cdn.mysql.com/
# tar xvfz mysql-5.6.14.tar.gz
# cd /usr/local/src/mysql-5.6.14
# cmake . cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql-5.6.14 -DDEFAULT_CHARSET=utf8 -DWITH_EXTRA_CHARSETS=all -DDEFAULT_COLLATION=utf8_general_ci -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1
# make
# make install

# cd /usr/local
# ln -s mysql-5.6.14 mysql

Formatting Mysql

# /usr/local/mysql/scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/


Start Service

# chown -R mysql:mysql /usr/local/mysql
# cp /usr/local/mysql/support_files/mysql.server /etc/init.d/mysql

# vi /etc/init.d/mysql
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data


# chown root:root /etc/init.d/mysql
# chmod 755  /etc/init.d/mysql
# /etc/init.d/mysql start
# chkconfig --add mysql



middleware/db/mysql/install/source.html.txt ยท Last modified: 2017/08/07 by admin

Page Tools