Percona/MariaDB/MySQL
# Restore a database from a dump .sql file
mysql -h mdbec-db1 -u wpadmin -pwpadminpass wpdb < ./wpdb.sql
# Percona XtraDB Cluster start commands
/etc/init.d/mysql bootstrap-pxc service mysql bootstrap-pxc service mysql start --wsrep_new_cluster service mysql start --wsrep-cluster-address="gcomm://"
# start a PXC node with the specified donor
service mysql start --wsrep_sst_donor=nodeC
# reset password
sudo /etc/init.d/mysql stop sudo mysqld_safe --skip-grant-tables & mysql -u root mysql> update mysql.user set password=password("new-password") where user='root'; mysql> flush privileges;
# grant
show grants; show grants for 'ssluser'@'%'; show privileges
# create user
create user 'username'@'localhost' identified by 'password'; grant all privileges on db_name.* to 'username'@'localhost';
# view fields related to SSL
select user,host,password,ssl_type,ssl_cipher,x509_issuer,x509_subject from mysql.user;
posted on 2016-07-09 00:06 Jeffrey F. 阅读(339) 评论(0) 编辑 收藏 举报