ó n[Qc @s¶dZddlZddlZddlmZddlmZddlmZmZddlm Z ddl m Z ddl m Z d Zd d Zd Zeejjejd ƒeeeeƒZejddddddddddddƒejddddddddddƒejdddddd dd!ƒejd"dddd#dd$ƒejd%dddd&dd'deƒejd(dddd)dd*deƒe ed+d,ƒeeeƒejƒ\ZZejrùejrùejd-ƒneeƒeeƒd ks!edkr;ej r;ejd.ƒnyeej!deƒZ"Wnejd/ƒnXej r–e j#e"ej$ej%ejƒneeƒd0krÂej rÂejd1ƒned Z&ed2Z'ej r"ej(dk r"yeej(deƒZ)Wq(ejd3ƒq(XndZ)iejd 6ej*d#6ejd46ej$d56ej+d&6Z,ye j-e"e)e&e'e,ƒZ.Wn)e k rªZ/d6Ge/j0GHe1d2ƒnXe1ƒdS(7s§ This file contains the clone user utility. It is used to clone an existing MySQL user to one or more new user accounts copying all grant statements to the new users. iÿÿÿÿN(tsetup_common_options(tparse_connection(t add_verbositytcheck_verbosity(tadd_format_option(t UtilError(t userclones!MySQL Utilities - mysqluserclone s.mysqluserclone - clone a MySQL user account tos one or more new userssv%prog --source=user:pass@host:port:socket --destination=user:pass@host:port:socket joe@localhost sam:secret1@localhostis--sourcetactiontstoretdesttsourcettypetstringtdefaultsroot@localhost:3306thelps,connection information for source server in s]the form: [:]@[:][:] or [:][:].s --destinationt destinations1connection information for destination server in s-ds--dumpt store_truetdumps?dump GRANT statements for user - does not require a destinations--forcet overwritesdrop the new user if it existss--include-global-privilegest global_privssCinclude privileges that match base_user@% as well as base_user@hosts--listt list_userss=list all users on the source - does not require a destinationsodisplay the list of users in either grid (default), tab, csv, or vertical format - valid only for --list optiontgrids+You cannot use --quiet and --dump together.s5No arguments found. Use --help for available options.s5Source connection values invalid or cannot be parsed.is,Wrong parameter combination or no new users.is:Destination connection values invalid or cannot be parsed.tquiett verbositysERROR:(2t__doc__tos.pathtostsystmysql.utilities.common.optionsRRRRRtmysql.utilities.exceptionRtmysql.utilities.commandRtNAMEt DESCRIPTIONtUSAGEtpathtbasenametargvtTruetFalsetparsert add_optiont parse_argstopttargsRRterrortlentNoneRR t source_valuest show_usersRtformatt base_usert new_user_listRt dest_valuesRRtoptionst clone_usertresteterrmsgtexit(((s&..\utilities\scripts\mysqluserclone.pytsŒ        ( "