Header Ads

Compiling From The Sources

















Compiling MySQL on Ubuntu 13.10

At the time of this writing I’m using Ubuntu 13.10 Server  & MySQL Cluster 7.3.6

Download the latest MySQL Cluster Sources.


Installing some libraries and java
@ubuntu:~# apt-get install bison libncurses5-dev libtool g++ gcc make cmake
@ubuntu:~# apt-get install openjdk-7-jdk

Download & Extracting MySQL Source Code
@ubuntu:~# wget { link Source }
@ubuntu:~# tar xvfz mysql-cluster-gpl-7.3.6.tar.gz -C /usr/local/src
@ubuntu:~# chown -R root.root /usr/local/src/mysql-cluster-gpl-7.3.6
@ubuntu:~#cd /usr/local/src//mysql-cluster-gpl-7.3.6

Configuring MySQL Cluster
@ubuntu: /usr/local/src/mysql-cluster-gpl-7.3.6# cmake .

Installing MySQL Cluster
@ubuntu: /usr/local/src/mysql-cluster-gpl-7.3.6# make clean install
// Adding mysql user and group;
// You will need to do this on all machines where MySQL will be installed
@ubuntu: /usr/local/mysql# groupadd mysql
@ubuntu: /usr/local/mysql# useradd -g mysql mysql
@ubuntu: /usr/local/mysql# chown -R mysql.mysql .

Dumping essential data in MySQL
@ubuntu: /usr/local/mysql# scripts/mysql_install_db --user=mysql
  * Can’t find messagefile ‘/usr/share/mysql/errmsg.sys
@ubuntu: /usr/local/mysql# cp /usr/local/mysql/share/ buntu /errmsg.sys /usr/share/mysql/errmsg.sys
@ubuntu: /usr/local/mysql# chown –R root .
@ubuntu: /usr/local/mysql# chown –R mysql data
@ubuntu: /usr/local/mysql# mkdir mysql-cluster

Copying mysqld daemon file
@ubuntu: /usr/local/mysql# cp support-files/mysql.server mysqld

Starting MySQL
@ubuntu: /usr/local/mysql# ./mysqld start

Setting MySQL Passwords
@ubuntu: /usr/local/mysql# bin/mysqladmin –u root password ‘new-password’

Securing MySQL Cluster installation
@ubuntu: /usr/local/mysql# bin/mysql_secure_installation

Now you can log into MySQL database
@ubuntu: /usr/local/mysql# bin/mysql –u root –p

Stopping MySQL
@ubuntu: /usr/local/mysql# ./mysqld stop

Creating a compressed MySQL template for the other machines
@ubuntu: /usr/local#  tar czf mysql.tgz mysql

No comments

Gobokster. Powered by Blogger.