Tuesday, 24 May 2016

conflicts with file from package MySQL




[root@garey-mysql1 local]# rpm -ivh MySQL-server-5.6.24-1.linux_glibc2.5.x86_64.rpm
Preparing...                ########################################### [100%]
        file /etc/init.d/mysql from install of MySQL-server-5.6.24-1.linux_glibc2.5.x86_64 conflicts with file from package Percona-Server-server-57-5.7.11-4.1.el6.x86_64
        file /etc/logrotate.d/mysql from install of MySQL-server-5.6.24-1.linux_glibc2.5.x86_64 conflicts with file from package Percona-Server-server-57-5.7.11-4.1.el6.x86_64
        。。。。。。。。。。。。。。。。。。。。。。
[root@garey-mysql1 local]# yum remove percona-server-server
Loaded plugins: fastestmirror
Setting up Remove Process
No Match for argument: percona-server-server
Loading mirror speeds from cached hostfile
 * base: mirror.digistar.vn
 * extras: centos.exabytes.com.my
 * updates: mirror.digistar.vn
base                                                                                                                                                                               | 3.7 kB     00:00
No Packages marked for removal
[root@garey-mysql1 local]# yum remove Percona-Server-server-57-5.7.11-4.1.el6.x86_64
Loaded plugins: fastestmirror
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package Percona-Server-server-57.x86_64 0:5.7.11-4.1.el6 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================
 Package                                                 Arch                                  Version                                       Repository                                              Size
=======================================================================================
Removing:
 Percona-Server-server-57                                x86_64                                5.7.11-4.1.el6                                @percona-release-x86_64                                173 M

Transaction Summary
=======================================================================================
Remove        1 Package(s)
Installed size: 173 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
error reading information on service mysql: No such file or directory
error: %preun(Percona-Server-server-57-5.7.11-4.1.el6.x86_64) scriptlet failed, exit status 1
Error in PREUN scriptlet in rpm package Percona-Server-server-57
Percona-Server-server-57-5.7.11-4.1.el6.x86_64 was supposed to be removed but is not!
  Verifying  : Percona-Server-server-57-5.7.11-4.1.el6.x86_64                                                                                                                                         1/1
Failed:
  Percona-Server-server-57.x86_64 0:5.7.11-4.1.el6
Complete!
[root@garey-mysql1 local]# rpm -qa | grep percona
percona-release-0.1-3.noarch
[root@garey-mysql1 local]# rpm -e --noscripts percona-release-0.1-3.noarch
[root@garey-mysql1 local]# rpm -qa | grep percona-server-server
[root@garey-mysql1 local]# rpm -qa | grep -i percona-server-server
Percona-Server-server-57-5.7.11-4.1.el6.x86_64
[root@garey-mysql1 local]# rpm -e --noscripts Percona-Server-server-57-5.7.11-4.1.el6.x86_64
[root@garey-mysql1 local]# rpm -qa | grep -i percona-server-server

[root@garey-mysql1 local]# rpm -ivh MySQL-server-5.6.24-1.linux_glibc2.5.x86_64.rpm
Preparing...                ########################################### [100%]
   1:MySQL-server           ########################################### [100%]
2016-05-24 11:15:17 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-05-24 11:15:17 0 [Note] /usr/sbin/mysqld (mysqld 5.6.24) starting as process 4675 ...
A random root password has been set. You will find it in '/root/.mysql_secret'.
2016-05-24 11:15:26 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-05-24 11:15:26 0 [Note] /usr/sbin/mysqld (mysqld 5.6.24) starting as process 4697 ...
A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !
You will find that password in '/root/.mysql_secret'.
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
--defaults-file argument to mysqld_safe when starting the server
[root@garey-mysql1 local]# ls -lah
total 107M
drwxr-xr-x.  2 root root 4.0K Sep 23  2011 lib
-rw-r--r--.  1 root root  22M Mar 26  2015 MySQL-client-5.6.24-1.linux_glibc2.5.x86_64.rpm
-rw-r--r--.  1 root root  85M Mar 26  2015 MySQL-server-5.6.24-1.linux_glibc2.5.x86_64.rpm
 [root@garey-mysql1 local]# rpm -ivh MySQL-client-5.6.24-1.linux_glibc2.5.x86_64.rpm
Preparing...                ########################################### [100%]
        file /usr/bin/mysql from install of MySQL-client-5.6.24-1.linux_glibc2.5.x86_64 conflicts with file from package Percona-Server-client-57-5.7.11-4.1.el6.x86_64
        file /usr/bin/mysql_config_editor from install of MySQL-client-5.6.24-1.linux_glibc2.5.x86_64 conflicts with file from package Percona-Server-client-57-5.7.11-4.1.el6.x86_64        。。。。。。。。。。。。。。。。。。
[root@garey-mysql1 local]# rpm -qa | grep -i Percona-Server-client
Percona-Server-client-57-5.7.11-4.1.el6.x86_64
[root@garey-mysql1 local]# rpm -e --noscripts Percona-Server-client-57-5.7.11-4.1.el6.x86_64
[root@garey-mysql1 local]# rpm -qa | grep -i Percona-Server-client
[root@garey-mysql1 local]# rpm -ivh MySQL-client-5.6.24-1.linux_glibc2.5.x86_64.rpm
Preparing...                ########################################### [100%]
   1:MySQL-client           ########################################### [100%]
[root@garey-mysql1 local]# rpm -ivh MySQL-shared-compat-5.6.24-1.linux_glibc2.5.x86_64.rpm
Preparing...                ########################################### [100%]
        file /usr/lib64/libmysqlclient.so.16.0.0 from install of MySQL-shared-compat-5.6.24-1.linux_glibc2.5.x86_64 conflicts with file from package Percona-Server-shared-51-5.1.73-rel14.12.625.rhel6.x86_64
        file /usr/lib64/libmysqlclient_r.so.16.0.0 from install of MySQL-shared-compat-5.6.24-1.linux_glibc2.5.x86_64 conflicts with file from package Percona-Server-shared-51-5.1.73-rel14.12.625.rhel6.x86_64
[root@garey-mysql1 local]# rpm -e Percona-Server-shared-51-5.1.73-rel14.12.625.rhel6.x86_64
error: Failed dependencies:
        libmysqlclient.so.16()(64bit) is needed by (installed) postfix-2:2.6.6-6.el6_7.1.x86_64
        libmysqlclient.so.16()(64bit) is needed by (installed) perl-DBD-MySQL-4.013-3.el6.x86_64
        libmysqlclient.so.16(libmysqlclient_16)(64bit) is needed by (installed) postfix-2:2.6.6-6.el6_7.1.x86_64
        libmysqlclient.so.16(libmysqlclient_16)(64bit) is needed by (installed) perl-DBD-MySQL-4.013-3.el6.x86_64
        mysql-libs is needed by (installed) postfix-2:2.6.6-6.el6_7.1.x86_64
 [root@garey-mysql1 local]# rpm -e --nodeps Percona-Server-shared-51-5.1.73-rel14.12.625.rhel6.x86_64
[root@garey-mysql1 local]# service mysql start
Starting MySQL. ERROR! The server quit without updating PID file (/var/run/mysqld/mysqld.pid).
[root@garey-mysql1 log]# tail -n 20 mysqld.log
2016-05-24 12:06:38 5317 [Note] InnoDB: Highest supported file format is Barracuda.
2016-05-24 12:06:38 5317 [Note] InnoDB: 128 rollback segment(s) are active.
2016-05-24 12:06:38 5317 [Note] InnoDB: Waiting for purge to start
2016-05-24 12:06:38 5317 [Note] InnoDB: 5.6.24 started; log sequence number 1625987
2016-05-24 12:06:38 5317 [Note] Server hostname (bind-address): '*'; port: 3306
2016-05-24 12:06:38 5317 [Note] IPv6 is available.
2016-05-24 12:06:38 5317 [Note]   - '::' resolves to '::';
2016-05-24 12:06:38 5317 [Note] Server socket created on IP: '::'.
2016-05-24 12:06:38 5317 [ERROR] /usr/sbin/mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 2 - No such file or directory)
2016-05-24 12:06:38 5317 [ERROR] Can't start server: can't create PID file: No such file or directory
160524 12:06:38 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
[root@garey-mysql1 log]# chown mysql:mysql /var/run/mysqld
chown: cannot access `/var/run/mysqld': No such file or directory
[root@garey-mysql1 log]# cd /var/run/
[root@garey-mysql1 run]# mkdir mysqld
[root@garey-mysql1 run]# chown mysql:mysql /var/run/mysqld
[root@garey-mysql1 run]# ls -lah
total 72K
drwxr-xr-x. 12 root  root  4.0K May 24 12:11 .
drwxr-xr-x. 18 root  root  4.0K May 23 18:32 ..
-rw-r--r--.  1 root  root     5 May 23 16:55 auditd.pid
drwxr-xr-x.  2 mysql mysql 4.0K May 24 12:11 mysqld
drwxrwxr-x.  2 root  root  4.0K May  4 03:23 netreport
[root@garey-mysql1 run]# service mysql start
Starting MySQL. SUCCESS!

Tuesday, 29 March 2016

SQL Server rights for basic application user

create role db_exector;
grant exec,view definition to db_exector;
GRANT SELECT, INSERT,  UPDATE on SCHEMA::dbo to db_exector
EXEC sp_addrolemember 'db_exector', 'loginuser'


create role db_readonly;
grant exec,view definition to db_readonly;
GRANT SELECT  on SCHEMA::dbo to db_readonly
EXEC sp_addrolemember 'db_readonly', 'loginuser' 

Tuesday, 16 February 2016

libev.so.4()(64bit) is needed by percona-xtrabackup-2.3.3-1.el6.x86_64

 percona xtrabackup on centos 5.6

[root@twpdb29 local]# wget https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.3.3/binary/redhat/6/x86_64/percona-xtrabackup-2.3.3-1.el6.x86_64.rpm
--2016-02-17 14:57:08--  https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.3.3/binary/redhat/6/x86_64/percona-xtrabackup-2.3.3-1.el6.x86_64.rpm
Resolving www.percona.com... 74.121.199.234
Connecting to www.percona.com|74.121.199.234|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5681880 (5.4M) [application/x-redhat-package-manager]
Saving to: “percona-xtrabackup-2.3.3-1.el6.x86_64.rpm”

100%[================================================================================================================================================================>] 5,681,880    315K/s   in 17s

2016-02-17 14:57:31 (328 KB/s) - “percona-xtrabackup-2.3.3-1.el6.x86_64.rpm” saved [5681880/5681880]

[root@twpdb29 local]# ls -lah
total 296M
drwxr-xr-x. 13 root  root  4.0K Feb 17 14:57 .
drwxr-xr-x. 14 root  root  4.0K Jan 28 07:52 ..
drwxr-xr-x.  2 root  root  4.0K Sep 23  2011 bin
drwxr-xr-x.  2 root  root  4.0K Sep 23  2011 etc
drwxr-xr-x.  2 root  root  4.0K Sep 23  2011 games
drwxr-xr-x.  2 root  root  4.0K Sep 23  2011 include
drwxr-xr-x.  2 root  root  4.0K Sep 23  2011 lib
drwxr-xr-x.  2 root  root  4.0K Sep 23  2011 lib64
drwxr-xr-x.  2 root  root  4.0K Sep 23  2011 libexec
drwxr-xr-x. 13 mysql mysql 4.0K Feb 17 11:12 mysql
-rw-r--r--.  1 root  root  291M Feb 16 14:54 mysql-5.6.11-linux-glibc2.5-x86_64.tar.gz
-rw-r--r--.  1 root  root   33K Feb 16 14:54 mytop-1.7-3.b737f60.el6.noarch.rpm
-rw-r--r--.  1 root  root  5.5M Dec 15 04:57 percona-xtrabackup-2.3.3-1.el6.x86_64.rpm
drwxr-xr-x.  2 root  root  4.0K Sep 23  2011 sbin
drwxr-xr-x.  5 root  root  4.0K Dec 29 18:49 share
drwxr-xr-x.  2 root  root  4.0K Sep 23  2011 src
[root@twpdb29 local]# rpm -Uvh percona-xtrabackup-2.3.3-1.el6.x86_64.rpm
warning: percona-xtrabackup-2.3.3-1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY
error: Failed dependencies:
        libev.so.4()(64bit) is needed by percona-xtrabackup-2.3.3-1.el6.x86_64

[root@twpdb29 local]# wget https://dl.fedoraproject.org/pub/epel/6/x86_64/libev-4.03-3.el6.x86_64.rpm
--2016-02-17 15:05:20--  https://dl.fedoraproject.org/pub/epel/6/x86_64/libev-4.03-3.el6.x86_64.rpm
Resolving dl.fedoraproject.org... 209.132.181.27, 209.132.181.24, 209.132.181.25, ...
Connecting to dl.fedoraproject.org|209.132.181.27|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 115352 (113K) [application/x-rpm]
Saving to: “libev-4.03-3.el6.x86_64.rpm”

100%[================================================================================================================================================================>] 115,352      224K/s   in 0.5s

2016-02-17 15:05:27 (224 KB/s) - “libev-4.03-3.el6.x86_64.rpm” saved [115352/115352]

[root@twpdb29 local]# ls -lah
total 296M
drwxr-xr-x. 13 root  root  4.0K Feb 17 15:05 .
drwxr-xr-x. 14 root  root  4.0K Jan 28 07:52 ..
drwxr-xr-x.  2 root  root  4.0K Sep 23  2011 bin
drwxr-xr-x.  2 root  root  4.0K Sep 23  2011 etc
drwxr-xr-x.  2 root  root  4.0K Sep 23  2011 games
drwxr-xr-x.  2 root  root  4.0K Sep 23  2011 include
drwxr-xr-x.  2 root  root  4.0K Sep 23  2011 lib
drwxr-xr-x.  2 root  root  4.0K Sep 23  2011 lib64
-rw-r--r--.  1 root  root  113K Jul 23  2011 libev-4.03-3.el6.x86_64.rpm
drwxr-xr-x.  2 root  root  4.0K Sep 23  2011 libexec
drwxr-xr-x. 13 mysql mysql 4.0K Feb 17 11:12 mysql
-rw-r--r--.  1 root  root  291M Feb 16 14:54 mysql-5.6.11-linux-glibc2.5-x86_64.tar.gz
-rw-r--r--.  1 root  root   33K Feb 16 14:54 mytop-1.7-3.b737f60.el6.noarch.rpm
-rw-r--r--.  1 root  root  5.5M Dec 15 04:57 percona-xtrabackup-2.3.3-1.el6.x86_64.rpm
drwxr-xr-x.  2 root  root  4.0K Sep 23  2011 sbin
drwxr-xr-x.  5 root  root  4.0K Dec 29 18:49 share
drwxr-xr-x.  2 root  root  4.0K Sep 23  2011 src
[root@twpdb29 local]# rpm -Uvh libev-4.03-3.el6.x86_64.rpm
warning: libev-4.03-3.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing...                ########################################### [100%]
   1:libev                  ########################################### [100%]
[root@twpdb29 local]# rpm -Uvh percona-xtrabackup-2.3.3-1.el6.x86_64.rpm
warning: percona-xtrabackup-2.3.3-1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY
Preparing...                ########################################### [100%]
   1:percona-xtrabackup     ########################################### [100%]
[root@twpdb29 local]#

Tuesday, 1 December 2015

MySQLdump individual records

For simple query:
SELECT * FROM side_limit where operator = 'aby';
mysqldump -uroot -p demo side_limit --where="operator = 'aby'" > > side_limit20151202.sql


For join or subquery:
Step 1:
create table side_limit_detail_dba like side_limit_detail;
Step 2:
insert into side_limit_detail_dba
select * from side_limit_detail where side_limit_id in
(SELECT id FROM side_limit where operator = 'aby');


Step 3:
mysqldump -uroot -p demo side_limit_detail_dba --where="operator = 'aby'" > side_limit_detail_dba20151202.sql


Step 4:
drop table side_limit_detail_dba

Thursday, 19 November 2015

MySQL backup user Minimize rights

GRANT RELOAD ON *.* TO 'mysqlbackup'@'localhost' identified by '**********';
GRANT CREATE, INSERT, DROP, UPDATE ON mysql.backup_progress TO 'mysqlbackup'@'localhost';
GRANT CREATE, INSERT, SELECT, DROP, UPDATE ON mysql.backup_history TO 'mysqlbackup'@'localhost';
GRANT REPLICATION CLIENT ON *.* TO 'mysqlbackup'@'localhost';
GRANT SUPER ON *.* TO 'mysqlbackup'@'localhost';
GRANT LOCK TABLES, SELECT, CREATE, ALTER ON *.* TO 'mysqlbackup'@'localhost';

Tuesday, 22 September 2015

Install MongoDB on centos6

[root@Master local]# ls -lah /usr/local/mongodb-linux-x86_64-3.0.6.gz

-rw-r--r--. 1 root root 39M Sep 22 12:39 /usr/local/mongodb-linux-x86_64-3.0.6.gz

[root@Master local]# tar -zxvf mongodb-linux-x86_64-3.0.6.gz

mongodb-linux-x86_64-3.0.6/README
mongodb-linux-x86_64-3.0.6/THIRD-PARTY-NOTICES
mongodb-linux-x86_64-3.0.6/GNU-AGPL-3.0
mongodb-linux-x86_64-3.0.6/bin/mongodump
mongodb-linux-x86_64-3.0.6/bin/mongorestore
mongodb-linux-x86_64-3.0.6/bin/mongoexport
mongodb-linux-x86_64-3.0.6/bin/mongoimport
mongodb-linux-x86_64-3.0.6/bin/mongostat
mongodb-linux-x86_64-3.0.6/bin/mongotop
mongodb-linux-x86_64-3.0.6/bin/bsondump
mongodb-linux-x86_64-3.0.6/bin/mongofiles
mongodb-linux-x86_64-3.0.6/bin/mongooplog
mongodb-linux-x86_64-3.0.6/bin/mongoperf
mongodb-linux-x86_64-3.0.6/bin/mongod
mongodb-linux-x86_64-3.0.6/bin/mongos
mongodb-linux-x86_64-3.0.6/bin/mongo

[root@Master local]# mv mongodb-linux-x86_64-3.0.6 mongodb

[root@Master local]# cd mongodb

[root@Master mongodb]# ls -lah

total 76K
drwxr-xr-x.  3 root root 4.0K Sep 23 11:26 .
drwxr-xr-x. 19 root root 4.0K Sep 23 11:28 ..
drwxr-xr-x.  2 root root 4.0K Sep 23 11:26 bin
-rw-r--r--.  1 1046 1046  34K Aug 24 08:43 GNU-AGPL-3.0
-rw-r--r--.  1 1046 1046 1.4K Aug 24 08:43 README
-rw-r--r--.  1 1046 1046  23K Aug 24 08:43 THIRD-PARTY-NOTICES

[root@Master mongodb]# groupadd mongo_grp

[root@Master mongodb]# useradd -r -g mongo_grp mongo_user

[root@Master mongodb]# ls -lah

total 76K
drwxr-xr-x.  3 root root 4.0K Sep 23 11:26 .
drwxr-xr-x. 19 root root 4.0K Sep 23 11:28 ..
drwxr-xr-x.  2 root root 4.0K Sep 23 11:26 bin
-rw-r--r--.  1 1046 1046  34K Aug 24 08:43 GNU-AGPL-3.0
-rw-r--r--.  1 1046 1046 1.4K Aug 24 08:43 README
-rw-r--r--.  1 1046 1046  23K Aug 24 08:43 THIRD-PARTY-NOTICES


[root@Master mongodb]# mkdir db

[root@Master mongodb]# mkdir logs

[root@Master mongodb]# ls -lah

total 84K
drwxr-xr-x.  5 root root 4.0K Sep 23 11:30 .
drwxr-xr-x. 19 root root 4.0K Sep 23 11:28 ..
drwxr-xr-x.  2 root root 4.0K Sep 23 11:26 bin
drwxr-xr-x.  2 root root 4.0K Sep 23 11:30 db
-rw-r--r--.  1 1046 1046  34K Aug 24 08:43 GNU-AGPL-3.0
drwxr-xr-x.  2 root root 4.0K Sep 23 11:30 logs
-rw-r--r--.  1 1046 1046 1.4K Aug 24 08:43 README
-rw-r--r--.  1 1046 1046  23K Aug 24 08:43 THIRD-PARTY-NOTICES

[root@Master mongodb]# chown -R mongo_user .

 [root@Master mongodb]# chgrp -R mongo_grp .
[root@Master mongodb]# echo "export PATH=$PATH:/usr/local/mongodb/bin" >>/etc/profile

[root@Master mongodb]# source /etc/profile

[root@Master mongodb]# cd /etc/init.d/

[root@Master init.d]# vim mongod

#!/bin/bash

# mongodb     Startup script for the mongodb server

# chkconfig: - 64 36

# description: MongoDB Database Server

# processname: mongodb

# Source function library

. /etc/rc.d/init.d/functions

 

if [ -f /etc/sysconfig/mongodb ]; then

        . /etc/sysconfig/mongodb

fi

prog="mongod"

mongod="/usr/local/mongodb/bin/mongod"

RETVAL=0

start() {

        echo -n $"Starting $prog: "

        daemon $mongod "--dbpath /usr/local/mongodb/db --fork --logpath /usr/local/mongodb/logs/mongodb.log --logappend 2>&1 >>/usr/local/mongodb/logs/mongodb.log"

        RETVAL=$?

        echo

        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog

        return $RETVAL

}

stop() {

        echo -n $"Stopping $prog: "

        killproc $prog

        RETVAL=$?

        echo

        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog

        return $RETVAL

}

reload() {

        echo -n $"Reloading $prog: "

        killproc $prog -HUP

        RETVAL=$?

        echo

        return $RETVAL

}

case "$1" in

        start)

                start

                ;;

        stop)

                stop

                ;;

        restart)

                stop

                start

                ;;

        condrestart)

                if [ -f /var/lock/subsys/$prog ]; then

                        stop

                        start

                fi

                ;;

        reload)

                reload

                ;;

        status)

                status $mongod

                RETVAL=$?

                ;;

        *)

                echo $"Usage: $0 {start|stop|restart|condrestart|reload|status}"

                RETVAL=1

esac

exit $RETVAL


[root@Master init.d]# chmod +x mongod

[root@Master init.d]# chkconfig --add mongod

 [root@Master init.d]# chkconfig --level 345 mongod on

[root@Master init.d]# service mongod status

mongod is stopped

[root@Master init.d]# service mongod start

Starting mongod:

[  OK  ]

[root@Master init.d]#

[root@Master init.d]# mongo

MongoDB shell version: 3.0.6
connecting to: test
Server has startup warnings:
2015-09-23T11:44:33.212+0800 I CONTROL  [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended.
2015-09-23T11:44:33.212+0800 I CONTROL  [initandlisten]
2015-09-23T11:44:33.212+0800 I CONTROL  [initandlisten]
2015-09-23T11:44:33.212+0800 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2015-09-23T11:44:33.212+0800 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2015-09-23T11:44:33.212+0800 I CONTROL  [initandlisten]
2015-09-23T11:44:33.212+0800 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2015-09-23T11:44:33.212+0800 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2015-09-23T11:44:33.212+0800 I CONTROL  [initandlisten]
> show databases;
local  0.078GB
> exit
bye

[root@Master init.d]# service mongod stop

Stopping mongod:                                           [  OK  ]

 

------------------------------------------The End--------------------------------------------------