MySQL mysqluserclone utility cheatsheet
mysqluserclone clone a MySQL user account to one or more new users
MySQL mysqluserclone utility uses an existing MySQL user account on one server, and clones it to create one or more new user accounts, on the same server or a different server.
Usage: mysqluserclone --source=user:pass@host:port:socket --destination=user:pass@host:port:socket joe@localhost sam:secret1@localhost
mysqluserclone --version
mysqluserclone --help
mysqluserclone --source=root:secret@localhost --list
mysqluserclone --source=root@localhost --list --format=CSV -vvv
mysqluserclone --source=root@localhost --dump --format=tab -vvv
mysqluserclone --source=root@localhost --destination=root@localhost joe@localhost sam:secret1@localhost sally:secret2@localhost
mysqluserclone --source=root@localhost --destination=root@localhost source_user@localhost target_user:secret1@192.168.1.1 --verbose
mysqluserclone Options:
--version show program's version number and exit
--help display a help message and exit
--license display program's license and exit
--ssl-ca=SSL_CA path to a file that contains a list of trusted SSL CAs.
--ssl-cert=SSL_CERT name of the SSL certificate file to use for establishing a secure connection.
--ssl-key=SSL_KEY name of the SSL key file to use for establishing a secure connection.
--ssl=SSL specifies if the server connection requires use of SSL. If an encrypted connection cannot be established, the connection attempt fails. By default 0 (SSL not required).
--source=SOURCE connection information for source server in the form: user[:password]@host[:port][:socket] or login-path[:port][:socket] or config- path[[group]].
--destination=DESTINATION connection information for destination server in the form: user[:password]@host[:port][:socket] or login-path[:port][:socket] or config- path[[group]].
-d, --dump dump GRANT statements for user - does not require a destination
--force drop the new user if it exists
--include-global-privileges include privileges that match base_user@% as well as base_user@host
-l, --list list all users on the source - does not require a destination
-f FORMAT, --format=FORMAT display the list of users in either grid (default), tab, csv, or vertical format - valid only for --list option
-v, --verbose control how much information is displayed. e.g., -v = verbose, -vv = more verbose, -vvv = debug
-q, --quiet turn off all messages for quiet execution.
Related MySQL Articles: mysqlshow utility commands mysqlfailover commands in MySQL
No comments:
Post a Comment