Thursday, June 4, 2015

Fixing missing RPM issues when install mysql workbench on Oracle Linux


[root@mysql03 repo]# yum localinstall ./mysql-workbench-commercial-6.3.3-1.el7.x86_64.rpm
Loaded plugins: langpacks
Examining ./mysql-workbench-commercial-6.3.3-1.el7.x86_64.rpm: mysql-workbench-commercial-6.3.3-1.el7.x86_64
Marking ./mysql-workbench-commercial-6.3.3-1.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package mysql-workbench-commercial.x86_64 0:6.3.3-1.el7 will be installed
--> Processing Dependency: tinyxml for package: mysql-workbench-commercial-6.3.3-1.el7.x86_64
--> Processing Dependency: libzip for package: mysql-workbench-commercial-6.3.3-1.el7.x86_64
--> Processing Dependency: python-paramiko for package: mysql-workbench-commercial-6.3.3-1.el7.x86_64
--> Processing Dependency: proj for package: mysql-workbench-commercial-6.3.3-1.el7.x86_64
--> Processing Dependency: libodbcinst.so.2()(64bit) for package: mysql-workbench-commercial-6.3.3-1.el7.x86_64
--> Processing Dependency: libodbc.so.2()(64bit) for package: mysql-workbench-commercial-6.3.3-1.el7.x86_64
--> Running transaction check
---> Package libzip.x86_64 0:0.10.1-8.el7 will be installed
---> Package mysql-workbench-commercial.x86_64 0:6.3.3-1.el7 will be installed
--> Processing Dependency: tinyxml for package: mysql-workbench-commercial-6.3.3-1.el7.x86_64
--> Processing Dependency: python-paramiko for package: mysql-workbench-commercial-6.3.3-1.el7.x86_64
--> Processing Dependency: proj for package: mysql-workbench-commercial-6.3.3-1.el7.x86_64
---> Package unixODBC.x86_64 0:2.3.1-10.el7 will be installed
--> Finished Dependency Resolution
Error: Package: mysql-workbench-commercial-6.3.3-1.el7.x86_64 (/mysql-workbench-commercial-6.3.3-1.el7.x86_64)
           Requires: python-paramiko
Error: Package: mysql-workbench-commercial-6.3.3-1.el7.x86_64 (/mysql-workbench-commercial-6.3.3-1.el7.x86_64)
           Requires: proj
Error: Package: mysql-workbench-commercial-6.3.3-1.el7.x86_64 (/mysql-workbench-commercial-6.3.3-1.el7.x86_64)
           Requires: tinyxml
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
 

 These packages could be found in EPEL.
EPEL (Extra Packages for Enterprise Linux) is open source and free community based repository project from Fedora team which provides 100% high quality add-on software packages for Linux distribution including RHEL (Red Hat Enterprise Linux), CentOS, and Scientific Linux.
 

[root@mysql03 repo]# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
--2015-06-03 20:04:48--  http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
Resolving dl.fedoraproject.org (dl.fedoraproject.org)... 209.132.181.23, 209.132.181.27, 209.132.181.24, ...
Connecting to dl.fedoraproject.org (dl.fedoraproject.org)|209.132.181.23|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14524 (14K) [application/x-rpm]
Saving to: ‘epel-release-7-5.noarch.rpm’
 
100%[=============================================================================================================>] 14,524      75.9KB/s   in 0.2s
 
2015-06-03 20:04:50 (75.9 KB/s) - ‘epel-release-7-5.noarch.rpm’ saved [14524/14524]
 
[root@mysql03 repo]# yum localinstall epel-release-7-5.noarch.rpm
Loaded plugins: langpacks
Examining epel-release-7-5.noarch.rpm: epel-release-7-5.noarch
Marking epel-release-7-5.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-5 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
=======================================================================================================================================================
 Package                             Arch                          Version                       Repository                                       Size
=======================================================================================================================================================
Installing:
 epel-release                        noarch                        7-5                           /epel-release-7-5.noarch                         24 k
 
Transaction Summary
=======================================================================================================================================================
Install  1 Package
 
Total size: 24 k
Installed size: 24 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : epel-release-7-5.noarch                                                                                                             1/1
  Verifying  : epel-release-7-5.noarch                                                                                                             1/1
 
Installed:
  epel-release.noarch 0:7-5
 

 

[root@mysql03 repo]# yum localinstall ./mysql-workbench-commercial-6.3.3-1.el7.x86_64.rpm
Loaded plugins: langpacks
Examining ./mysql-workbench-commercial-6.3.3-1.el7.x86_64.rpm: mysql-workbench-commercial-6.3.3-1.el7.x86_64
Marking ./mysql-workbench-commercial-6.3.3-1.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package mysql-workbench-commercial.x86_64 0:6.3.3-1.el7 will be installed
--> Processing Dependency: tinyxml for package: mysql-workbench-commercial-6.3.3-1.el7.x86_64
--> Processing Dependency: libzip for package: mysql-workbench-commercial-6.3.3-1.el7.x86_64
--> Processing Dependency: python-paramiko for package: mysql-workbench-commercial-6.3.3-1.el7.x86_64
--> Processing Dependency: proj for package: mysql-workbench-commercial-6.3.3-1.el7.x86_64
--> Processing Dependency: libodbcinst.so.2()(64bit) for package: mysql-workbench-commercial-6.3.3-1.el7.x86_64
--> Processing Dependency: libodbc.so.2()(64bit) for package: mysql-workbench-commercial-6.3.3-1.el7.x86_64
--> Running transaction check
---> Package libzip.x86_64 0:0.10.1-8.el7 will be installed
---> Package proj.x86_64 0:4.8.0-4.el7 will be installed
---> Package python-paramiko.noarch 0:1.15.1-1.el7 will be installed
--> Processing Dependency: python-crypto >= 2.1 for package: python-paramiko-1.15.1-1.el7.noarch
--> Processing Dependency: python-ecdsa for package: python-paramiko-1.15.1-1.el7.noarch
---> Package tinyxml.x86_64 0:2.6.2-3.el7 will be installed
---> Package unixODBC.x86_64 0:2.3.1-10.el7 will be installed
--> Running transaction check
---> Package python-crypto.x86_64 0:2.6.1-1.el7 will be installed
---> Package python-ecdsa.noarch 0:0.11-3.el7 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
============================================================================================
 Package           Arch   Version      Repository                                      Size
============================================================================================
Installing:
 mysql-workbench-commercial
                   x86_64 6.3.3-1.el7  /mysql-workbench-commercial-6.3.3-1.el7.x86_64 119 M
Installing for dependencies:
 libzip            x86_64 0.10.1-8.el7 ol7_latest                                      47 k
 proj              x86_64 4.8.0-4.el7  epel                                           181 k
 python-crypto     x86_64 2.6.1-1.el7  epel                                           469 k
 python-ecdsa      noarch 0.11-3.el7   epel                                            69 k
 python-paramiko   noarch 1.15.1-1.el7 epel                                           999 k
 tinyxml           x86_64 2.6.2-3.el7  epel                                            49 k
 unixODBC          x86_64 2.3.1-10.el7 ol7_latest                                     407 k
 
Transaction Summary
============================================================================================
Install  1 Package (+7 Dependent packages)
 
Total size: 121 M
Total download size: 2.2 M
Installed size: 128 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7Server/epel/packages/python-paramiko-1.15.1-1.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Public key for python-paramiko-1.15.1-1.el7.noarch.rpm is not installed
(1/7): python-paramiko-1.15.1-1.el7.noarch.rpm                       | 999 kB  00:00:02
(2/7): tinyxml-2.6.2-3.el7.x86_64.rpm                                |  49 kB  00:00:00
(3/7): python-ecdsa-0.11-3.el7.noarch.rpm                            |  69 kB  00:00:05
(4/7): unixODBC-2.3.1-10.el7.x86_64.rpm                              | 407 kB  00:00:04
(5/7): libzip-0.10.1-8.el7.x86_64.rpm                                |  47 kB  00:00:08
(6/7): python-crypto-2.6.1-1.el7.x86_64.rpm                          | 469 kB  00:00:08
(7/7): proj-4.8.0-4.el7.x86_64.rpm                                   | 181 kB  00:00:08
--------------------------------------------------------------------------------------------
Total                                                       255 kB/s | 2.2 MB  00:00:08
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Importing GPG key 0x352C64E5:
 Userid     : "Fedora EPEL (7) "
 Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5
 Package    : epel-release-7-5.noarch (@/epel-release-7-5.noarch)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : tinyxml-2.6.2-3.el7.x86_64                                               1/8
  Installing : libzip-0.10.1-8.el7.x86_64                                               2/8
  Installing : python-ecdsa-0.11-3.el7.noarch                                           3/8
  Installing : unixODBC-2.3.1-10.el7.x86_64                                             4/8
warning: /etc/odbcinst.ini created as /etc/odbcinst.ini.rpmnew
  Installing : python-crypto-2.6.1-1.el7.x86_64                                         5/8
  Installing : python-paramiko-1.15.1-1.el7.noarch                                      6/8
  Installing : proj-4.8.0-4.el7.x86_64                                                  7/8
  Installing : mysql-workbench-commercial-6.3.3-1.el7.x86_64                            8/8
  Verifying  : proj-4.8.0-4.el7.x86_64                                                  1/8
  Verifying  : python-crypto-2.6.1-1.el7.x86_64                                         2/8
  Verifying  : mysql-workbench-commercial-6.3.3-1.el7.x86_64                            3/8
  Verifying  : unixODBC-2.3.1-10.el7.x86_64                                             4/8
  Verifying  : python-ecdsa-0.11-3.el7.noarch                                           5/8
  Verifying  : libzip-0.10.1-8.el7.x86_64                                               6/8
  Verifying  : tinyxml-2.6.2-3.el7.x86_64                                               7/8
  Verifying  : python-paramiko-1.15.1-1.el7.noarch                                      8/8
 
Installed:
  mysql-workbench-commercial.x86_64 0:6.3.3-1.el7
 
Dependency Installed:
  libzip.x86_64 0:0.10.1-8.el7                    proj.x86_64 0:4.8.0-4.el7
  python-crypto.x86_64 0:2.6.1-1.el7              python-ecdsa.noarch 0:0.11-3.el7
  python-paramiko.noarch 0:1.15.1-1.el7           tinyxml.x86_64 0:2.6.2-3.el7
  unixODBC.x86_64 0:2.3.1-10.el7
 
Complete!
[root@mysql03 repo]#

 

Tuesday, June 2, 2015

Install MySQL Enterprise Monitor Server & Agent


[root@mysql03 repo]# ./mysqlmonitor-3.0.21.3149-linux-x86_64-installer.bin
Language Selection
 
Please select the installation language
[1] English - English
[2] Japanese - 日本語
Please choose an option [1] :
Info: During the installation process you will be asked to enter usernames and
passwords for various pieces of the Enterprise Monitor. Please be sure to make
note of these in a secure location so you can recover them in case they are
forgotten.
Press [Enter] to continue :
----------------------------------------------------------------------------
Welcome to the setup wizard for the MySQL Enterprise Monitor
 
----------------------------------------------------------------------------
Please specify the directory where the MySQL Enterprise Monitor will be
installed
 
Installation directory [/opt/mysql/enterprise/monitor]:
 
----------------------------------------------------------------------------
Select Requirements
 
Select Requirements
 
Please indicate the scope of monitoring this installation will initially encompass so we can configure Tomcat and MySQL memory usage accordingly. The manual contains instructions for updating the configuration later, if needed. This installation will monitor a:
 
System Size
 
[1] Small system: No more than 5 to 10 MySQL Servers monitored from a laptop computer or low-end server with no more than 4 GB of RAM
[2] Medium system: Up to 100 MySQL Servers monitored from a medium-size but shared server with 4 GB to 8 GB of RAM
[3] Large system: More than 100 MySQL Servers monitored from a high-end server dedicated to MEM with more than 8 GB RAM
Please choose an option [2] : 1
 
----------------------------------------------------------------------------
Tomcat Server Options
 
Please specify the following parameters for the bundled Tomcat Server
 
Tomcat Server Port [18080]:
 
Tomcat SSL Port [18443]:
 
----------------------------------------------------------------------------
Service Manager User Account
 
You are installing as root, but it's not good practice for the Service Manager
to run under the root user account.  Please specify the name of a user account
to use for the Service Manager below.  Note that this user account will be
created for you if it doesn't already exist.
 
User Account [mysqlmem]:
 
----------------------------------------------------------------------------
Database Installation
 
Please select which database configuration you wish to use
 
[1] I wish to use the bundled MySQL database
[2] I wish to use an existing MySQL database *
Please choose an option [1] :
 
* We will validate the version of your existing MySQL database server during the
installation. See documentation for minimum version requirements.
 
Important: MySQL Enterprise Monitor 2.3 and 3.0 cannot share a Repository. If
you're not using the bundled Repository and will be running both versions in
your environment, you must set up and maintain separate repositories for them.
 
 
 
Visit the following URL for more information:
 
http://dev.mysql.com/doc/mysql-monitor/3.0/en/mem-install-server.html
 
----------------------------------------------------------------------------
Repository Configuration
 
Please specify the following parameters for the bundled MySQL server
 
Repository Username [service_manager]:
 
Password :
Re-enter :
MySQL Database Port [13306]:
 
MySQL Database Name [mem]:
 
 
 
Use SSL when connecting to the database [y/N]:
 
 
----------------------------------------------------------------------------
Setup is now ready to install MySQL Enterprise Monitor on your computer.
 
Do you want to continue? [Y/n]: y
 
----------------------------------------------------------------------------
Please wait while Setup installs MySQL Enterprise Monitor on your computer.
 
 Installing
 0% ______________ 50% ______________ 100%
 #########################################
 
----------------------------------------------------------------------------
Completed installing files
 
 
 
Setup has completed installing the MySQL Enterprise Monitor files on your
computer
 
Uninstalling the MySQL Enterprise Monitor files can be done by invoking:
/opt/mysql/enterprise/monitor/uninstall
 
To complete the installation, launch the MySQL Enterprise Monitor UI and
complete the initial setup. Refer to the readme file for additional information
and a list of known issues.
 
 
Press [Enter] to continue :
 
----------------------------------------------------------------------------
Completed installing files
 
WARNING: To improve security, all communication with the Service Manager uses
SSL. Because only a basic self-signed security certificate is included when the
Service Manager is installed, it is likely that your browser will display a
warning about an untrusted connection. Please either install your own
certificate or add a security exception for the Service Manager URL to your
browser. See the documentation for more information.
 
http://dev.mysql.com/doc/mysql-monitor/3.0/en/mem-install-server.html
Press [Enter] to continue :
 
----------------------------------------------------------------------------
Setup has finished installing MySQL Enterprise Monitor on your computer.
 
View Readme File [Y/n]: n
 
Info: To configure the MySQL Enterprise Monitor please visit the following page:
https://localhost:18443
Press [Enter] to continue :

 




[mysql@mysql01 repo]$ ./mysqlmonitoragent-3.0.21.3149-linux-x86-64bit-installer.bin
Language Selection
 
Please select the installation language
[1] English - English
[2] Japanese - 日本語
Please choose an option [1] :
----------------------------------------------------------------------------
Welcome to the MySQL Enterprise Monitor Agent Setup Wizard.
 
----------------------------------------------------------------------------
Installation directory
 
 
Please specify the directory where MySQL Enterprise Monitor Agent will be
installed
 
 
Installation directory [/mysql/mysql/enterprise/agent]:
 
 
How will the agent connect to the database it is monitoring?
 
 
[1] TCP/IP
[2] Socket
Please choose an option [1] :
 
----------------------------------------------------------------------------
Monitoring Options
 
You can configure the Agent to monitor this host (file systems, CPU, RAM, etc.)
and then use the Monitor UI to furnish connection parameters for all current and
future running MySQL Instances. This can be automated or done manually for each
MySQL Instance discovered by the Agent. (Note: scanning for running MySQL
processes is not available on Windows, but you can manually add new connections
and parameters from the Monitor UI as well.)
 
Visit the following URL for more information:
http://dev.mysql.com/doc/mysql-monitor/3.0/en/mem-qanal-using-feeding.html
 
Monitoring options:
 
[1] Host only: Configure the Agent to monitor this host and then use the Monitor UI to furnish connection parameters for current and future running MySQL Instances.
[2] Host and database: Configure the Agent to monitor this host and furnish connection parameters for a specific MySQL Instance now. This process may be scripted. Once installed, this Agent will also continuously look for new MySQL Instances to monitor as described above.
Please choose an option [2] : 1
 
----------------------------------------------------------------------------
Setup is now ready to begin installing MySQL Enterprise Monitor Agent on your
computer.
 
Do you want to continue? [Y/n]:
 
----------------------------------------------------------------------------
Please wait while Setup installs MySQL Enterprise Monitor Agent on your
computer.
 
 Installing
 0% ______________ 50% ______________ 100%
 #########################################
 
----------------------------------------------------------------------------
MySQL Enterprise Monitor Options
 
Hostname or IP address []: mysql03
 
Tomcat SSL Port [18443]:
 
The following are the username and password that the Agent will use to connect
to the Monitor.  They were defined when you installed the Monitor.  They can be
modified under Settings, Manage Users.  Their role is defined as "agent".
 
Agent Username [agent]: emagent
 
Agent Password :
Re-enter :
----------------------------------------------------------------------------
Configuration Report
 
 
 
MySQL Enterprise Monitor Agent (Version 3.0.21.3149)
 
The settings you specified are listed below.
 
Note that if you are using a Connector to collect Query Analyzer data,
you will need some of these settings to configure the Connector. See
the following for more information:
http://dev.mysql.com/doc/mysql-monitor/3.0/en/mem-qanal-using-feeding.html
 
Installation directory: /mysql/mysql/enterprise/agent
 
MySQL Enterprise Monitor UI:
-------------------------
Hostname or IP address: mysql03
Tomcat Server Port: 18443
Use SSL: yes
 
 
Press [Enter] to continue :
 
----------------------------------------------------------------------------
Start MySQL Enterprise Monitor Agent
 
Info to start the MySQL Enterprise Monitor Agent
 
The MySQL Enterprise Monitor Agent was successfully installed. To start the
Agent please invoke:
/mysql/mysql/enterprise/agent/etc/init.d/mysql-monitor-agent start
 
Press [Enter] to continue :
 
----------------------------------------------------------------------------
Setup has finished installing MySQL Enterprise Monitor Agent on your computer.
 
View Agent Readme File [Y/n]: n
 
[mysql@mysql01 repo]$ /mysql/mysql/enterprise/agent/etc/init.d/mysql-monitor-agent start
Starting MySQL Enterprise Agent service... SUCCESS!




 


Monday, June 1, 2015

MySQL Cluster Quick Start Guide – LINUX

 


Perform Following Changes on all 3 servers


[root@mysql01 ~]# cat /etc/hosts
192.168.6.51    mysql01
192.168.6.52    mysql02
192.168.6.53    mysql03
 
[mysql@mysql01 repo]$ id -a mysql
uid=200(mysql) gid=200(mysql) groups=200(mysql)
 
[mysql@mysql01 ~]$ cat ~/.bash_profile
export MYSQL_HOME=/mysql/mysqlc
export PATH=$MYSQL_HOME/bin:$PATH
 
 
[mysql@mysql01 repo]$ unzip "MySQL Cluster 7.4.6 TAR for Generic Linux (glibc2.5) x86 (64bit).zip"
[mysql@mysql01 repo]$ tar zxvf mysql-cluster-advanced-7.4.6-linux-glibc2.5-x86_64.tar.gz
 
[mysql@mysql01 repo]$ mv mysql-cluster-advanced-7.4.6-linux-glibc2.5-x86_64 /mysql/
[mysql@mysql01 repo]$ ln -s /mysql/mysql-cluster-advanced-7.4.6-linux-glibc2.5-x86_64 /mysql/mysqlc
[mysql@mysql01 repo]$ mkdir /mysql/my_cluster/mysqld_data
[mysql@mysql01 repo]$ mkdir /mysql/my_cluster/ndb_data
 
 
[mysql@mysql01 repo]$ cat /mysql/my_cluster/my.cnf
[mysqld]
ndbcluster
datadir=/mysql/my_cluster/mysqld_data
basedir=/mysql/mysqlc
port=5000
ndb-mgmd-host=mysql03:1186
 
 
[mysql@mysql01 repo]$ cat /mysql/my_cluster/config.ini
[ndb_mgmd]
hostname=mysql03
datadir=/mysql/my_cluster/ndb_data
NodeId=1
 
[ndbd default]
noofreplicas=2
datadir=/mysql/my_cluster/ndb_data
 
[ndbd]
hostname=mysql01
NodeId=11
 
[ndbd]
hostname=mysql02
NodeId=12
 
[mysqld]
hostname=mysql01
NodeId=21
 
[mysqld]
hostname=mysql02
NodeId=22

 

Perform following changes in the order of commands executions


[mysql@mysql01 mysqlc]$ cd /mysql/mysqlc
[mysql@mysql01 mysqlc]$ scripts/mysql_install_db --no-defaults --datadir=/mysql/my_cluster/mysqld_data/
[mysql@mysql02 mysqlc]$ cd /mysql/mysqlc
[mysql@mysql02 mysqlc]$ scripts/mysql_install_db --no-defaults --datadir=/mysql/my_cluster/mysqld_data/
 
[mysql@mysql03 ~]$ /mysql/mysqlc/bin/ndb_mgmd -f /mysql/my_cluster/config.ini --initial --configdir=/mysql/my_cluster/
 
[mysql@mysql01 ~]$ /mysql/mysqlc/bin/ndbd -c mysql03:1186
 
[mysql@mysql02 ~]$ /mysql/mysqlc/bin/ndbd -c mysql03:1186
 
[mysql@mysql01 ~]$ /mysql/mysqlc/bin/mysqld --defaults-file=/mysql/my_cluster/my.cnf &
[mysql@mysql02 ~]$ /mysql/mysqlc/bin/mysqld --defaults-file=/mysql/my_cluster/my.cnf &
 
[mysql@mysql03 ~]$ /mysql/mysqlc/bin/ndb_mgm -e show
Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=11   @192.168.6.51  (mysql-5.6.24 ndb-7.4.6, Nodegroup: 0, *)
id=12   @192.168.6.52  (mysql-5.6.24 ndb-7.4.6, Nodegroup: 0)
 
[ndb_mgmd(MGM)] 1 node(s)
id=1    @192.168.6.53  (mysql-5.6.24 ndb-7.4.6)
 
[mysqld(API)]   2 node(s)
id=21   @192.168.6.51  (mysql-5.6.24 ndb-7.4.6)
id=22   @192.168.6.52  (mysql-5.6.24 ndb-7.4.6)

 

Perform testing


[mysql@mysql01 ~]$ /mysql/mysqlc/bin/mysql -h localhost -P 5000 -u root
mysql> create user root@'mysql%' identified by 'P@ssw0rd';
mysql> grant all privileges on *.* to root@'mysql%';
 
[mysql@mysql02 ~]$ /mysql/mysqlc/bin/mysql -h localhost -P 5000 -u root
mysql> create user root@'mysql%' identified by 'P@ssw0rd';
mysql> grant all privileges on *.* to root@'mysql%';
 
[mysql@mysql03 ~]$ /mysql/mysqlc/bin/mysql -h mysql01 -P 5000 -u root -p
Enter password:
mysql> select user();
+--------------+
| user()       |
+--------------+
| root@mysql03 |
+--------------+
1 row in set (0.00 sec)
 
mysql>  create database clusterdb;
Query OK, 1 row affected (0.08 sec)
 
mysql> use clusterdb;
Database changed
 
mysql> create table simples (id int not null primary key) engine=ndb;
Query OK, 0 rows affected (0.20 sec)
 
mysql> insert into simples values (1),(2),(3),(4);
Query OK, 4 rows affected (0.01 sec)
Records: 4  Duplicates: 0  Warnings: 0
 
mysql>  select * from simples;
+----+
| id |
+----+
|  3 |
|  1 |
|  2 |
|  4 |
+----+
4 rows in set (0.00 sec)
 
mysql> quit
Bye
 
[mysql@mysql03 ~]$ /mysql/mysqlc/bin/mysql -h mysql02 -P 5000 -u root -p
Enter password:
 
mysql> use clusterdb;
Database changed
 
mysql> select * from simples;
+----+
| id |
+----+
|  1 |
|  2 |
|  4 |
|  3 |
+----+
4 rows in set (0.01 sec)
 
mysql> quit
Bye

 

Shutdown


[mysql@mysql03 ~]$ /mysql/mysqlc/bin/mysqladmin -h mysql01 -P 5000 -u root -pP@ssw0rd shutdown
[mysql@mysql03 ~]$ /mysql/mysqlc/bin/mysqladmin -h mysql02 -P 5000 -u root -pP@ssw0rd shutdown
 [mysql@mysql03 ~]$ /mysql/mysqlc/bin/ndb_mgm -e shutdown
Connected to Management Server at: localhost:1186
3 NDB Cluster node(s) have shutdown.
Disconnecting to allow management server to shutdown.

 


 

FATAL ERROR: please install the following Perl modules before executing scripts/mysql_install_db: Data::Dumper

[mysql@mysql01 mysqlc]$ scripts/mysql_install_db --no-defaults --datadir=/mysql/my_cluster/mysqld_data/
FATAL ERROR: please install the following Perl modules before executing scripts/mysql_install_db:
Data::Dumper


[root@mysql01 ~]# yum install perl-Data-Dumper.x86_64
Resolving Dependencies
--> Running transaction check
---> Package perl-Data-Dumper.x86_64 0:2.145-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved
=======================================================================================================================================================
 Package                                  Arch                           Version                              Repository                          Size
=======================================================================================================================================================
Installing:
 perl-Data-Dumper                         x86_64                         2.145-3.el7                          ol7_latest                          47 k

Transaction Summary
=======================================================================================================================================================
Install  1 Package

Total download size: 47 k
Installed size: 97 k
Is this ok [y/d/N]: y
Downloading packages:
perl-Data-Dumper-2.145-3.el7.x86_64.rpm                                                                                         |  47 kB  00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : perl-Data-Dumper-2.145-3.el7.x86_64                                                                                                 1/1
  Verifying  : perl-Data-Dumper-2.145-3.el7.x86_64                                                                                                 1/1

Installed:
  perl-Data-Dumper.x86_64 0:2.145-3.el7

Complete!

Saturday, May 30, 2015

Sample Static IP configuration in OL7 RHEL7

[root@mysql01 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eno16777728
TYPE=Ethernet
BOOTPROTO=static
NAME=eno16777728
ONBOOT=yes
IPADDR=192.168.6.51
NETMASK=255.255.255.0
GATEWAY=192.168.6.2
DNS1=192.168.6.2
DNS2=8.8.8.8
DOMAIN=localdomain