redhat cluster 6 mysql
ccs-0.16.2-63.el6.x86_64.rpm cluster-cim-0.16.2-20.el6.x86_64.rpm cluster-glue-1.0.5-6.el6.x86_64.rpm cluster-glue-libs-1.0.5-6.el6.x86_64.rpm cluster-glue-libs-devel-1.0.5-6.el6.x86_64.rpm cluster-snmp-0.16.2-20.el6.x86_64.rpm clusterlib-3.0.12.1-49.el6.x86_64.rpm clusterlib-devel-3.0.12.1-49.el6.x86_64.rpm cman-3.0.12.1-49.el6.x86_64.rpm corosync-1.4.1-15.el6.x86_64.rpm corosynclib-1.4.1-15.el6.x86_64.rpm corosynclib-devel-1.4.1-15.el6.x86_64.rpm fence-virt-0.2.3-13.el6.x86_64.rpm fence-virtd-checkpoint-0.2.3-13.el6.x86_64.rpm foghorn-0.1.2-1.el6.x86_64.rpm libesmtp-devel-1.0.4-15.el6.x86_64.rpm libqb-0.14.2-3.el6.x86_64.rpm libqb-devel-0.14.2-3.el6.x86_64.rpm libtool-ltdl-devel-2.2.6-15.5.el6.x86_64.rpm luci-0.26.0-37.el6.x86_64.rpm modcluster-0.16.2-20.el6.x86_64.rpm omping-0.0.4-1.el6.x86_64.rpm openais-1.1.1-7.el6.x86_64.rpm openaislib-1.1.1-7.el6.x86_64.rpm openaislib-devel-1.1.1-7.el6.x86_64.rpm pacemaker-1.1.8-7.el6.x86_64.rpm pacemaker-cli-1.1.8-7.el6.x86_64.rpm pacemaker-cluster-libs-1.1.8-7.el6.x86_64.rpm pacemaker-cts-1.1.8-7.el6.x86_64.rpm pacemaker-doc-1.1.8-7.el6.x86_64.rpm pacemaker-libs-1.1.8-7.el6.x86_64.rpm pacemaker-libs-devel-1.1.8-7.el6.x86_64.rpm pcs-0.9.26-10.el6.noarch.rpm python-repoze-what-plugins-sql-1.0-0.6.rc1.el6.noarch.rpm python-repoze-what-quickstart-1.0.1-1.el6.noarch.rpm python-repoze-who-friendlyform-1.0-0.3.b3.el6.noarch.rpm python-repoze-who-plugins-sa-1.0-0.4.rc1.el6.noarch.rpm python-tw-forms-0.9.9-1.el6.noarch.rpm resource-agents-3.9.2-21.el6.x86_64.rpm rgmanager-3.0.12.1-17.el6.x86_64.rpm ricci-0.16.2-63.el6.x86_64.rpm
rpm -ivh ccs-0.16.2-63.el6.x86_64.rpm cluster-cim-0.16.2-20.el6.x86_64.rpm cluster-glue-1.0.5-6.el6.x86_64.rpm cluster-glue-libs-1.0.5-6.el6.x86_64.rpm cluster-glue-libs-devel-1.0.5-6.el6.x86_64.rpm cluster-snmp-0.16.2-20.el6.x86_64.rpm clusterlib-3.0.12.1-49.el6.x86_64.rpm clusterlib-devel-3.0.12.1-49.el6.x86_64.rpm cman-3.0.12.1-49.el6.x86_64.rpm corosync-1.4.1-15.el6.x86_64.rpm corosynclib-1.4.1-15.el6.x86_64.rpm corosynclib-devel-1.4.1-15.el6.x86_64.rpm fence-virt-0.2.3-13.el6.x86_64.rpm fence-virtd-checkpoint-0.2.3-13.el6.x86_64.rpm foghorn-0.1.2-1.el6.x86_64.rpm libesmtp-devel-1.0.4-15.el6.x86_64.rpm libqb-0.14.2-3.el6.x86_64.rpm libqb-devel-0.14.2-3.el6.x86_64.rpm libtool-ltdl-devel-2.2.6-15.5.el6.x86_64.rpm luci-0.26.0-37.el6.x86_64.rpm modcluster-0.16.2-20.el6.x86_64.rpm omping-0.0.4-1.el6.x86_64.rpm openais-1.1.1-7.el6.x86_64.rpm openaislib-1.1.1-7.el6.x86_64.rpm openaislib-devel-1.1.1-7.el6.x86_64.rpm pacemaker-1.1.8-7.el6.x86_64.rpm pacemaker-cli-1.1.8-7.el6.x86_64.rpm pacemaker-cluster-libs-1.1.8-7.el6.x86_64.rpm pacemaker-cts-1.1.8-7.el6.x86_64.rpm pacemaker-doc-1.1.8-7.el6.x86_64.rpm pacemaker-libs-1.1.8-7.el6.x86_64.rpm pacemaker-libs-devel-1.1.8-7.el6.x86_64.rpm pcs-0.9.26-10.el6.noarch.rpm python-repoze-what-plugins-sql-1.0-0.6.rc1.el6.noarch.rpm python-repoze-what-quickstart-1.0.1-1.el6.noarch.rpm python-repoze-who-friendlyform-1.0-0.3.b3.el6.noarch.rpm python-repoze-who-plugins-sa-1.0-0.4.rc1.el6.noarch.rpm python-tw-forms-0.9.9-1.el6.noarch.rpm resource-agents-3.9.2-21.el6.x86_64.rpm rgmanager-3.0.12.1-17.el6.x86_64.rpm ricci-0.16.2-63.el6.x86_64.rpm
warning: ccs-0.16.2-63.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:python-repoze-who-plugi########################################### [ 2%]
2:python-repoze-who-frien########################################### [ 5%]
3:python-repoze-what-plug########################################### [ 7%]
4:libtool-ltdl-devel ########################################### [ 10%]
5:python-repoze-what-quic########################################### [ 12%]
6:python-tw-forms ########################################### [ 15%]
7:pacemaker-doc ########################################### [ 17%]
8:libesmtp-devel ########################################### [ 20%]
9:ccs ########################################### [ 22%]
10:libqb ########################################### [ 24%]
11:pacemaker-libs ########################################### [ 27%]
12:corosynclib ########################################### [ 29%]
13:corosync ########################################### [ 32%]
14:clusterlib ########################################### [ 34%]
15:modcluster ########################################### [ 37%]
16:cluster-glue-libs ########################################### [ 39%]
17:corosynclib-devel ########################################### [ 41%]
18:libqb-devel ########################################### [ 44%]
19:resource-agents ########################################### [ 46%]
20:pacemaker-cluster-libs ########################################### [ 49%]
21:openaislib ########################################### [ 51%]
22:openais ########################################### [ 54%]
23:cluster-snmp ########################################### [ 56%]
24:ricci ########################################### [ 59%]
25:pacemaker-cli ########################################### [ 61%]
26:pacemaker ########################################### [ 63%]
27:pacemaker-cts ########################################### [ 66%]
28:fence-virt ########################################### [ 68%]
29:pacemaker-libs-devel ########################################### [ 71%]
30:pcs ########################################### [ 73%]
31:openaislib-devel ########################################### [ 76%]
32:clusterlib-devel ########################################### [ 78%]
33:cman ########################################### [ 80%]
34:rgmanager ########################################### [ 83%]
35:foghorn ########################################### [ 85%]
36:fence-virtd-checkpoint ########################################### [ 88%]
37:cluster-glue ########################################### [ 90%]
38:cluster-glue-libs-devel########################################### [ 93%]
39:cluster-cim ########################################### [ 95%]
40:luci ########################################### [ 98%]
41:omping ########################################### [100%]
[root@localhost Packages]# passwd ricci
Changing password for user ricci.
New password:
BAD PASSWORD: it is based on a dictionary word
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
[root@localhost Packages]# service ricci restart
Shutting down ricci:
Starting oddjobd: [ OK ]
generating SSL certificates... done
Generating NSS database... done
Starting ricci: [ OK ]
[root@localhost Packages]# service cman restart
Stopping cluster:
Leaving fence domain... [ OK ]
Stopping gfs_controld... [ OK ]
Stopping dlm_controld... [ OK ]
Stopping fenced... [ OK ]
Stopping cman... [ OK ]
Unloading kernel modules... [ OK ]
Unmounting configfs... [ OK ]
Starting cluster:
Checking if cluster has been disabled at boot... [ OK ]
Checking Network Manager...
Network Manager is either running or configured to run. Please disable it in the cluster.
[FAILED]
Stopping cluster:
Leaving fence domain... [ OK ]
Stopping gfs_controld... [ OK ]
Stopping dlm_controld... [ OK ]
Stopping fenced... [ OK ]
Stopping cman... [ OK ]
Unloading kernel modules... [ OK ]
Unmounting configfs... [ OK ]
[root@localhost Packages]# service rgmanager restart
Stopping Cluster Service Manager: [ OK ]
Starting Cluster Service Manager: [ OK ]
[root@localhost Packages]# service modclusterd restart
Shutting down Cluster Module - cluster monitor:
Starting Cluster Module - cluster monitor: Setting verbosity level to LogBasic
[ OK ]
[root@localhost Packages]# service luci restart
Stop luci... [FAILED]
Adding following auto-detected host IDs (IP addresses/domain names), corresponding to `localhost.localdomain' address, to the configuration of self-managed certificate `/var/lib/luci/etc/cacert.config' (you can change them by editing `/var/lib/luci/etc/cacert.config', removing the generated certificate `/var/lib/luci/certs/host.pem' and restarting luci):
(none suitable found, you can still do it manually as mentioned above)
Generating a 2048 bit RSA private key
writing new private key to '/var/lib/luci/certs/host.pem'
Start luci... [ OK ]
Point your web browser to https://localhost.localdomain:8084 (or equivalent) to access luci
[root@localhost Packages]# service pacemaker restart
Pacemaker Cluster Manager is already stopped, cleaning up a[ OK ] processes and files
Starting Pacemaker Cluster Manager: [ OK ]
service iptables stop
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: nat mangle filte[ OK ]
iptables: Unloading modules: [ OK ]
[root@localhost Desktop]# service iptables save
[root@localhost Desktop]# service cman status
corosync is stopped
[root@localhost Desktop]# service pacemaker status
pacemakerd dead but pid file exists
[root@localhost Desktop]# service pacemaker stop
non-option ARGV-elements: standby
Could not establish cib_rw connection: Connection refused (111)
Error signing on to the CIB service: Transport endpoint is not connected
Waiting for shutdown of managed resourcesUsage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
Could not establish cib_rw connection: Connection refused (111)
Error signing on to the CIB service: Transport endpoint is not connected
[ OK ]
Leaving fence domainfence_tool: leave: can't communicate with fenced
Pacemaker Cluster Manager is already stopped, cleaning up any stale processes and files [ OK ]
Stopping cluster:
Leaving fence domain... [ OK ]
Stopping gfs_controld... [ OK ]
Stopping dlm_controld... [ OK ]
Stopping fenced... [ OK ]
Stopping cman... [ OK ]
Unloading kernel modules... [ OK ]
Unmounting configfs... [ OK ]
[root@localhost Desktop]# service cman status
corosync is stopped
[root@localhost Desktop]# service cman restart
Stopping cluster:
Leaving fence domain... [ OK ]
Stopping gfs_controld... [ OK ]
Stopping dlm_controld... [ OK ]
Stopping fenced... [ OK ]
Stopping cman... [ OK ]
Unloading kernel modules... [ OK ]
Unmounting configfs... [ OK ]
Starting cluster:
Checking if cluster has been disabled at boot... [ OK ]
Checking Network Manager...
Network Manager is either running or configured to run. Please disable it in the cluster.
[FAILED]
Stopping cluster:
Leaving fence domain... [ OK ]
Stopping gfs_controld... [ OK ]
Stopping dlm_controld... [ OK ]
Stopping fenced... [ OK ]
Stopping cman... [ OK ]
Unloading kernel modules... [ OK ]
Unmounting configfs... [ OK ]
[root@localhost Desktop]# service cman status
corosync is stopped
[root@localhost Desktop]# service NetworkManager stop
Stopping NetworkManager daemon: [ OK ]
[root@localhost Desktop]# service NetworkManager stop^C
[root@localhost Desktop]# chkconfig NetworkManager off
[root@localhost Desktop]# service cman status
corosync is stopped
[root@localhost Desktop]# service cman restart
Stopping cluster:
Leaving fence domain... [ OK ]
Stopping gfs_controld... [ OK ]
Stopping dlm_controld... [ OK ]
Stopping fenced... [ OK ]
Stopping cman... [ OK ]
Unloading kernel modules... [ OK ]
Unmounting configfs... [ OK ]
Starting cluster:
Checking if cluster has been disabled at boot... [ OK ]
Checking Network Manager... [ OK ]
Global setup... [ OK ]
Loading kernel modules... [ OK ]
Mounting configfs... [ OK ]
Starting cman... [ OK ]
Waiting for quorum... [ OK ]
Starting fenced... [ OK ]
Starting dlm_controld... [ OK ]
Tuning DLM kernel config... [ OK ]
Starting gfs_controld... [ OK ]
Unfencing self... [ OK ]
Joining fence domain... [ OK ]
chkconfig ricci on
chkconfig luci on
chkconfig cman on
chkconfig rgmanager on
chkconfig modclusterd on
chkconfig pacemaker on
chkconfig network on
chkconfig iptables off
chkconfig ip6tables off
mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@localhost Desktop]# service mysqld restart
Stopping mysqld: [ OK ]
Initializing MySQL database: Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/bin/mysqlbug script!
[ OK ]
Starting mysqld: [ OK ]
[root@localhost Desktop]# chkconfig mysqld on
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
pid-file = /var/run/mysqld/mysqld.pid
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"/etc/my.cnf" 11L, 289C
declare MYSQL_pid_file="/var/run/mysqld/mysqld.pid"
"/usr/share/cluster/mysql.sh"
tail -30 /var/log/messages
May 26 13:26:48 expert rgmanager[18146]: [mysql] Stopping Service mysql:mysql > Failed
May 26 13:26:48 expert rgmanager[4094]: stop on mysql "mysql" returned 1 (generic error)
May 26 13:26:48 expert rgmanager[4094]: Marking service:mysqld as 'disabled', but some resources may still be allocated!
May 26 13:26:49 expert rgmanager[4094]: Service service:mysqld is disabled
May 26 13:26:52 expert ricci[18175]: Executing '/usr/bin/virsh nodeinfo'
May 26 13:27:08 expert rgmanager[18346]: [script] Executing /etc/rc.d/init.d/httpd status
May 26 13:27:14 expert ricci[18374]: Executing '/usr/bin/virsh nodeinfo'
May 26 13:27:14 expert ricci[18376]: Executing '/usr/libexec/ricci/ricci-worker -f /var/lib/ricci/queue/994856293'
May 26 13:27:16 expert ricci[18380]: Executing '/usr/bin/virsh nodeinfo'
May 26 13:27:16 expert ricci[18382]: Executing '/usr/libexec/ricci/ricci-worker -f /var/lib/ricci/queue/1520961529'
May 26 13:27:16 expert modcluster: Stopping service: mysqld
May 26 13:27:16 expert ricci[18388]: Executing '/usr/bin/virsh nodeinfo'
May 26 13:27:16 expert ricci[18390]: Executing '/usr/libexec/ricci/ricci-worker -f /var/lib/ricci/queue/1521528486'
May 26 13:27:17 expert ricci[18393]: Executing '/usr/libexec/ricci/ricci-worker -f /var/lib/ricci/queue/433548644'
May 26 13:27:22 expert ricci[18401]: Executing '/usr/bin/virsh nodeinfo'
May 26 13:27:23 expert ricci[18404]: Executing '/usr/bin/virsh nodeinfo'
May 26 13:27:23 expert ricci[18406]: Executing '/usr/libexec/ricci/ricci-worker -f /var/lib/ricci/queue/2079918490'
May 26 13:27:24 expert ricci[18410]: Executing '/usr/bin/virsh nodeinfo'
May 26 13:27:24 expert ricci[18412]: Executing '/usr/libexec/ricci/ricci-worker -f /var/lib/ricci/queue/238650375'
May 26 13:27:24 expert modcluster: Starting service: mysqld on node
May 26 13:27:24 expert ricci[18421]: Executing '/usr/bin/virsh nodeinfo'
May 26 13:27:24 expert ricci[18422]: Executing '/usr/bin/virsh nodeinfo'
May 26 13:27:24 expert ricci[18425]: Executing '/usr/libexec/ricci/ricci-worker -f /var/lib/ricci/queue/1544036783'
May 26 13:27:25 expert rgmanager[4094]: Service service:mysqld started
May 26 13:27:25 expert ricci[18535]: Executing '/usr/libexec/ricci/ricci-worker -f /var/lib/ricci/queue/617681426'
May 26 13:27:26 expert ricci[18539]: Executing '/usr/bin/virsh nodeinfo'
May 26 13:27:34 expert ricci[18547]: Executing '/usr/bin/virsh nodeinfo'
May 26 13:27:34 expert ricci[18549]: Executing '/usr/libexec/ricci/ricci-worker -f /var/lib/ricci/queue/1240635206'
May 26 13:27:35 expert ricci[18554]: Executing '/usr/libexec/ricci/ricci-worker -f /var/lib/ricci/queue/1725957354'
May 26 13:27:38 expert rgmanager[18571]: [script] Executing /etc/rc.d/init.d/httpd status
rg_test test /etc/cluster/cluster.conf start service mysqld
Enable Remote Access to MySQL from an External IP
The following command will allow access to the MySQL database from a remote IP address:
mysql> GRANT ALL PRIVILEGES ON *.* TO user_name@HOST IDENTIFIED BY ‘pass_word’;
Replace the username and password in this command with the relevant data.
Enable Remote Access to MySQL from an External Dynamic IP
If a user is on a dynamic IP address they can be granted privileges when connecting from another host. To do this, use ‘%’ for the HOST portion of the command. This is not recommended because it is less secure since it allows connections from anywhere.
GRANT ALL PRIVILEGES ON *.* TO user_name@'%' IDENTIFIED BY ‘pass_word’;
Replace the username and password in this command with the relevant data.
Flush the Privileges
After changing grant table data, reload the privileges:
mysql> flush privileges;
declare MYSQL_pid_file="/var/run/mysqld/mysqld.pid"
"/usr/share/cluster/mysql.sh"
Comments
Post a Comment