码迷,mamicode.com
首页 > 数据库 > 详细

Percona/MariaDB/MySQL

时间:2016-07-09 00:44:00      阅读:214      评论:0      收藏:0      [点我收藏+]

标签:

# 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;

 

Percona/MariaDB/MySQL

标签:

原文地址:http://www.cnblogs.com/jeffreyf/p/percona-mariadb-mysql.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!