grant all privileges on *.* to ‘wordpress’@'%’ identified by ‘wordpress’;
grant all privileges on *.* to ‘wordpress’@'localhost’ identified by ‘wordpress’;
flush privileges;
关于测试 数据节点和sql节点 某个环节坏了,数据可用性测试过了,网上很多测试例子。
图文教程:
现在机器mysql信息 ps -ef | grep mysql
[root@VM_44_174_centos ~]# ps -ef |grep mysql
root 3594 1 0 16:06 ? 00:00:56 ndb_mgmd -f /var/lib/mysql-cluster/config.ini –configdir=/var/lib/mysql-cluster
root 10331 28967 0 17:48 pts/4 00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe –defaults-file=/etc/myndb.cnf
mysql 10618 10331 0 17:48 pts/4 00:00:21 /usr/local/mysql/bin/mysqld –defaults-file=/etc/myndb.cnf –basedir=/usr/local/mysql-cluster –datadir=/usr/local/mysql-cluster/data –plugin-dir=/usr/local/mysql-cluster/lib/plugin –user=mysql –log-error=/usr/local/mysql-cluster/data/error.err –pid-file=/usr/local/mysql-cluster/data/pid.pid –socket=/tmp/mysql_ndb.sock –port=3366
root 10980 1 0 17:55 pts/4 00:00:00 /bin/sh /alidata/server/mysql/bin/mysqld_safe –datadir=/alidata/server/mysql/data –pid-file=/alidata/server/mysql/data/VM_44_174_centos.pid
mysql 11221 10980 0 17:55 pts/4 00:00:01 /alidata/server/mysql/bin/mysqld –basedir=/alidata/server/mysql –datadir=/alidata/server/mysql/data –plugin-dir=/alidata/server/mysql/lib/plugin –user=mysql –log-error=/alidata/server/mysql/data/VM_44_174_centos.err –pid-file=/alidata/server/mysql/data/VM_44_174_centos.pid –socket=/tmp/mysql.sock –port=3306
root 11413 31036 0 18:00 pts/1 00:00:00 mysql -S /tmp/mysql_ndb.sock
root 13980 28967 0 19:53 pts/4 00:00:00 grep mysql
[root@VM_44_174_centos ~]# netstat -nlp |grep mysql
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 11221/mysqld
tcp 0 0 :::3366 :::* LISTEN 10618/mysqld
unix 2 [ ACC ] STREAM LISTENING 3992243 10618/mysqld /tmp/mysql_ndb.sock
unix 2 [ ACC ] STREAM LISTENING 3998013 11221/mysqld /tmp/mysql.sock
记录一下,便于查阅。