mysql-utilities-1.6.1/0000755001577100000120000000000012473641277014160 5ustar pb2userwheelmysql-utilities-1.6.1/data/0000755001577100000120000000000012473641277015071 5ustar pb2userwheelmysql-utilities-1.6.1/data/fabric.cfg.in0000644001577100000120000000173112471520441017372 0ustar pb2userwheel[storage] address = localhost:3306 user = fabric password = database = fabric auth_plugin = mysql_native_password connection_timeout = 6 connection_attempts = 6 connection_delay = 1 [servers] user = fabric password = unreachable_timeout = 5 [protocol.xmlrpc] address = localhost:32274 threads = 5 user = admin password = disable_authentication = no realm = MySQL Fabric ssl_ca = ssl_cert = ssl_key = [protocol.mysql] address = localhost:32275 user = admin password = disable_authentication = no ssl_ca = ssl_cert = ssl_key = [executor] executors = 5 [logging] level = INFO url = file:///var/log/fabric.log [sharding] mysqldump_program = /usr/bin/mysqldump mysqlclient_program = /usr/bin/mysql prune_limit = 10000 [statistics] prune_time = 3600 [failure_tracking] notifications = 300 notification_clients = 50 notification_interval = 60 failover_interval = 0 detections = 3 detection_interval = 6 detection_timeout = 1 prune_time = 3600 [connector] TTL = 1 [client] password= mysql-utilities-1.6.1/data/mysql-fabric-doctrine-1.4.0.zip0000644001577100000120000003151412473641047022450 0ustar pb2userwheelPK )Cmysql-fabric-doctrine-1.4.0/PK "C$mysql-fabric-doctrine-1.4.0/example/PK"C($īyW /mysql-fabric-doctrine-1.4.0/example/example.phpVn6}WL/ q7חQv-A-QTwHɱ7-ș9s̈O?Yk;b63M8[P$H:R3H2Έ EhPTSuO6"Y0c %䀏LQ;YBL%L6O˄;{HQ0TdW5\QA,70c1bj3؈`"&Eg{j`Ed@1Ce6JMӒ,:4X0`>:L g4f,x5!4i2 bXVt V\`E-KJB a\ >id=~Ŕa@߽ KueA>4-xP o.CZ0q?ЋO0~RĞp)U >Hmg^wuIi${tEnwTK@w84ya4w? &b^&8 c)REAn$c6AF 7[.egg;Z^$Z㵪}MU*)v TIeyZ = dXeL[NLH}:&/:Nv{(VyQQ8I4h4$LlH1$~Q*kȑ&lR3|j=-k{}wK{Xv5t89y}Bg uouz+J^$J^v<& E G.R/tWZ%HLAac3^܉[N5=SR AIr(f+'*Jʼ$ʵ[G(*[vHQs1#ֶUbm"kg&=zOSN5U9q:AI 7=~Y!UBHcV<B&~,U ֈw meDŽG(|C)5q2gah/_opw`n{UֹFJ+Ԟ Aw/j{| V%7lPK)CPQK#mysql-fabric-doctrine-1.4.0/COPYING\[sȕ~N.X9f٩$b" I[@)".~wNwg6Ll@sΥ?hy?FI^?>]57Mb*5ї?t.*{Y>O o+c\oiem˴=,D?㙴gtlUm^UJ[?~OӾ҃WSJ"zkMVfR/Kl]e6|t̳)rlLAzNxY勲iofSce<7=[ի[[r46{):F;+Jro욟':\jGtuZXX0UfN[{w"7+jS,e&%$lS =Mqh <%V7tNdVuIӞt͉؜20]-Q >MZtITz[/Uo+7,qiCz@OƊi1S9ܢ$u!w3X:>qI F/҂ϺB slIeك|]B_&f0S=! AYiN~ TRm+ڟ8nNQfT/iZC):}GX}ܩNš؜IVXZev}, bZ`% b2ZIgU<:&B%)taބ^OC~oE]XbeeJZE-βT 2Jdeyb<[*Ux'0lnY C7T*mzj&tv!yZ S)җ<˳:sn+ GQƜL@c\f+/▾0mN'.gZī)2BOCn%sGڑR1nf=2~wOXT-R/VEGI%vM*Al2PP UEa_Yh`昖SHڟ%]Z?s&Q`z[gTy!3g95(bc%A&{uG0:(<[Wxpn|nlxӢ+oɧpub0}1Vb6%LO9oac "rȈ7@>cǒDir$bE Ҫ\6 !cKډ5=\8zGl-w o'T QP䦽(ڃ5>[|]#̒y-%ᅣw: 0q8qXfٲQ#M!/!\qZLVsP3+s|.e"7X$7j)TC1K<Br9>tBXB'HZt]- J=z`0эnx4շ <}Np: ?01n:62bs $5RpwN]Y9bMwn[TM?BpQ;#lobԳ#eP6cJ{UI,Wj;쁎Y&jF A^-YQ(;4[ srX nnߢs AɪhkYN84.{aIW=Ts˼1xcl Ԝl!  02>򦅿 fll.aWNKla_ S4y!ym+D7c0 hwJ^>` 9xBptnMA 0ltYGGҼ$ lk&Q)Ir%ȝ^1lMv|s&[ap怎"=ffjw:0c:Ϧij ō{'.8]{:;ܥJdGTQ95Q<:hsEXI d\eKgy;5,*۴O1sdHS=c~@&Eq2[X捂3CXϬ:k:rGn\֘U˰ _=a%ڥTf89@qJϸÓ%J(IRE@hAƈYBZR-8/$28 B!}*! lzpN}i)}I< @/\ G^4s+ &}rsRfm'*-;0~Fښ|+^D/X!=h0_E89DdT`dŽz*TMэ"IPW޲NEU(@ߧjk\مd_,t2K6můjBl"XU,.T,)ْW;R5*M^P{:gMz=ga$3l'~5ƛ.f>%toy'o[ ,O0”Bzh+ǘ  )zʱ*VK,zI!JKilF/&QrcpQTcjk1I*30R>iҚv+nTTPȏ2;ʟʊ\ZϦQ$@g,2ilҗp/R9rl!?"9կeޠeEysNh^yQ'^uI ##S RbG?/QQpޢ j-iDP P0s6% @ [ |uT9n2@G,$q66)|J섷MZe/ %BcId'K=1Nkg,'\sMε3im6`|a8<T^ 1.r- CmǸX_{^aQNG$>濜?veX "JYпׅ:qd@.9R?s(l:a OIYAW~/Zm|ހOӠuʉ/Tw0;iZ"1"Mx8W&fOnr-`eKߍ9>MJYPb7rz@ 7ȤҊ4=/~ʶNFV>~̕>i )H`:[7&ͅ|^C'`sdR-t+最(颵MoFhFrBPM,;UIjw&5&8(Wq RBZVĊ,W&cE'[i FǩkD6pڡZ\' *8>bE8ߪc%Ѣ>n^֑o\\j-LDI^(bC?J$e )P%t1h@ % 5nQEz#V&KZ1yc0Xph* r(mjD2ȱ+?!Tj$O*ЭyVK>OB則u(hLwjE_]ydBJ;6.+vd\3~EF?b Ł|Ľ 9ؓ.Jm'Cq:h3 Ȑ5z|}#c"bJbtu+6':~~¹[Ui%w:η:zMXsS$QbKZ t 9J:WSDC_17 FSi8+8?rk7+tj2؋DEZXȊ9w/8PE e~S_01?2Ş$l[F@x]pOx=[zldFZEҾ`eUܴ& ɒk.+ s=ñK7ΔM.8NCuU(Kؽyȸ#w!'2\eIaa .ڇ(dPA#{B*91 YPqpWZBᢖA=69+( < q)yڬZ4^[<<[n)T%5IMEMU7=Y x[O۶؃)d'hĶC(\u~Jϕn; R\˖'?u7_." }ύ/[v3m~`$WUՇ' [.ȃaZ?MIϷ8Sdu6!C$FH2K嵝]KIxzeS-(eK ,K\ نf/OP, ϒJyJ5 N k#RO´s.#^cٞjp Mo.G̫F+>pψr~72NyC9-\n UikZq..E#DpxY;ttbv k҈SQLR)l(P-#s4m`t/ɀ #I)}y`ĀS`NNS~2nEh~V9ٟG kxS-^mzI>o'6xd,ֽ!7#@!N- KC*i#"LOJ[ *TWQmI n?Q4Ps-gŹ޳yxh3nLiU~M8btOxO'@g+/vFꠎv0aw{-]`)= 5=Nͱ2籣? ‰'Pu,xSq&fAy6v0Ѝop~oSo#A(10h 1߹AG*liKll{իW;Ar/tJ );.`Ò #'4ɤ?=/{jpn'ϓNH썾 z|σMx"^ Ԙs6`0hg|W}Jz8_#5_Dt Ñ:Άϼ p'w3}7LxTڝ_ԏl8*{>_,GMC^h`JW(З O_ D'#:gcf֯Na0!fp6-x/_?Ot XH'uc wi'HW?57x@g/$^z>= 3f YO/kAM!ғ Vķ|Ax%/Ё=N;sDF3i]}о~hLj4g~vAdVRٿWDϐ"B<&*(o&=}\Td}/\!+HEtĉA`е{.۽zq?BhY_3OO#SiB'Q3}"cX( ekNn=1mx491yL,ĒkA ^ɦ VwNzcDq57_<"[On0OV"ާgĝH9?} ;"゜[ 367b _ Dd G;o#a@)+k$ydƝCPVn(`*Sڌ.N/p [ש7( z(E'B6]h8l7k-$|jvaE:5(|!Y@g Wے )>>h#-؈NLr?}?.1a5d9+M?I'ᵺר1_h^A1//gݡ?) md}|v*v`c;Kror߶x!|g@܇uY#=\dV$DfE(>Orq7qA?I8KibSzy/"Ͳ(zNQtD'?tdVz-/?!%]8?e~\Lhy@.Y/UeAgۀe>;{H$+0Лgğ*~?YQљs%#2nsAUWJ,| w}5' ޑ/뵆|sGG>#oxғn<\ķio; n;7K:iɻg7V\/ݏ5q?4.0D1I=ܨMIK_߸1EC 3=|9Ҷɤ$~sNiVX$kמFWWMUdTH4Qd# 5]=z;GM+W]Å[<μuUGZ;#VS~e &qTRH6RBȰ`Т`&啰P2l - "X]-3؇n3EiΈeυֺs] 4*fmAv<[ThiHpTRiVX2p|F5d h3' \<y]P!5 󒷂&Dh,ly0rsx4>JW%ֵD&)#Qp?H(%hN0 I 1L4^Fq Y:d6@^z?&VT tLH|NP _ 8Ͻ&Z6)e}%(Z5wK>Ũ ok%i'$v"6-^Ke1:Qm8.9Jޏ" n4'_.n")Z7Gu81ݙ0=#?8Jrɬ}]ѡ*,V90`Wj8o o QyX1[ޕ{kokÉ<Ki7jy+ v}Yb=P>?<{<)˫+cpߝ?PK"C;p-D)mysql-fabric-doctrine-1.4.0/composer.json5j!Fԙt]Kh7SH6P5&W'tUk z3qƋ}: ̘6Q! /udGfR9d|>ׯkVMn\2>Q;Q'oޠ'~ۇUN${ua\yVР=6ikF#?C`PT #)4DW&iI4🫻anPK )CAmysql-fabric-doctrine-1.4.0/PK "C$A:mysql-fabric-doctrine-1.4.0/example/PK"C($īyW /|mysql-fabric-doctrine-1.4.0/example/example.phpPK)CPQK#Bmysql-fabric-doctrine-1.4.0/COPYINGPK 7"C A!mysql-fabric-doctrine-1.4.0/src/PK 7"C,A"mysql-fabric-doctrine-1.4.0/src/MySQLFabric/PK7"C@P,\UD\"mysql-fabric-doctrine-1.4.0/src/MySQLFabric/MySQLFabricException.phpPK"CGI%mysql-fabric-doctrine-1.4.0/src/MySQLFabric/MySQLFabricShardManager.phpPK"C;p-D)+mysql-fabric-doctrine-1.4.0/composer.jsonPKj)CݡH",mysql-fabric-doctrine-1.4.0/READMEPK /mysql-utilities-1.6.1/LICENSE.txt0000644001577100000120000004310312473640742016000 0ustar pb2userwheel GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. mysql-utilities-1.6.1/setup.py0000644001577100000120000003351612473640742015676 0ustar pb2userwheel#!/usr/bin/env python # # Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # """Setup script for MySQL Utilities""" from __future__ import absolute_import import ConfigParser import fnmatch import os import platform import sys import distutils.core from distutils.core import setup from distutils.command.build_scripts import build_scripts as _build_scripts from distutils.command.install import install as _install from distutils.command.install_data import install_data as _install_data from distutils.util import change_root from distutils.file_util import DistutilsFileError from distutils import log, dir_util from info import META_INFO, INSTALL # Check required Python version if sys.version_info[0:2] not in [(2, 6), (2, 7)]: log.error("MySQL Utilities requires Python v2.6 or v2.7") sys.exit(1) COMMANDS = { 'cmdclass': { }, } # Custom DistUtils command try: from support.distribution.commands import (dist_deb, dist_rpm, bdist, build, sdist) except ImportError: pass # Use default when not available else: COMMANDS['cmdclass'].update({ 'sdist': sdist.GenericSourceGPL, 'build': build.Build, 'sdist_com': sdist.SourceCommercial, 'bdist_com': bdist.BuiltCommercial, 'bdist_deb': dist_deb.BuildDistDebian, 'bdist_com_deb': dist_deb.BuildCommercialDistDebian, 'bdist_rpm': dist_rpm.BuiltDistRPM, 'sdist_rpm': dist_rpm.SourceRPM, 'bdist_com_rpm': dist_rpm.BuiltCommercialRPM, }) if platform.uname()[0] == 'Darwin': try: from support.distribution.commands.dist_osx import ( BuildDistOSX, BuildDistOSXcom ) except ImportError: pass else: COMMANDS['cmdclass'].update({ 'bdist_osx': BuildDistOSX, 'bdist_com_osx': BuildDistOSXcom }) if platform.uname()[0] == 'SunOS': try: from support.distribution.commands.dist_solaris import ( BuildDistSunOS, BuildDistSunOScom ) except ImportError: pass else: COMMANDS['cmdclass'].update({ 'bdist_sunos': BuildDistSunOS, 'bdist_com_sunos': BuildDistSunOScom }) ARGS = { } PROFILE_SCRIPT = ''' prepend_path () ( IFS=':' for D in $PATH; do if test x$D != x$1; then OUTPATH="${OUTPATH:+$OUTPATH:}$D" fi done echo "$1:$OUTPATH" ) PATH=`prepend_path %s` ''' class install(_install): """Install MySQL Utilities""" user_options = _install.user_options + [ ("skip-profile", None, "Skip installing a profile script"), ] boolean_options = _install.boolean_options + ['skip-profile'] def initialize_options(self): """Initialize options""" _install.initialize_options(self) self.skip_profile = False def finalize_options(self): """Finalize options""" _install.finalize_options(self) def run(self): _install.run(self) class install_man(distutils.core.Command): description = "Install Unix manual pages" user_options = [ ('prefix=', None, 'installation prefix (default /usr/share/man)'), ('root=', None, "install everything relative to this alternate root directory"), ('record=', None, "filename in which to record list of installed files"), ] def initialize_options(self): """Initialize options""" self.root = None self.prefix = None self.record = None def finalize_options(self): """Finalize options""" self.set_undefined_options('install', ('root', 'root'), ('record', 'record') ) if not self.prefix: self.prefix = '/usr/share/man' if self.root: self.prefix = change_root(self.root, self.prefix) def run(self): """Run the command""" srcdir = os.path.join('docs', 'man') manpages = os.listdir(srcdir) self._outfiles = [] for man in manpages: src_man = os.path.join(srcdir, man) section = os.path.splitext(man)[1][1:] dest_dir = os.path.join(self.prefix, 'man' + section) self.mkpath(dest_dir) # Could be different section dest_man = os.path.join(dest_dir, man) self.copy_file(src_man, dest_man) self._outfiles.append(dest_man) # Disabled, done in the RPM spec #self._write_record() def _write_record(self): """Write list of installed files""" if self.record: outputs = self.get_outputs() if self.root: # strip any package prefix root_len = len(self.root) for counter in xrange(len(outputs)): outputs[counter] = outputs[counter][root_len:] log.info("writing list of installed files to '{0}'".format( self.record)) f = open(self.record, "a") for line in outputs: f.write(line + "\n") def get_outputs(self): return self._outfiles class install_scripts(_install): """Install MySQL Utilities scripts""" description = "Install the Shell Profile (Linux/Unix)" user_options = _install.user_options + [ ('root=', None, "install everything relative to this alternate root directory"), ] boolean_options = _install.boolean_options + ['skip-profile'] profile_filename = 'mysql-utilities.sh' profile_d_dir = '/etc/profile.d/' def initialize_options(self): """initialize options""" _install.initialize_options(self) self.skip_profile = False self.root = None self.install_dir = None def finalize_options(self): """Finalize options""" _install.finalize_options(self) self.set_undefined_options('install', ('install_dir', 'install_dir'), ('root', 'root')) def _create_shell_profile(self): """Creates and installes the shell profile This method will create and try to install the shell profile file under /etc/profile.d/. It will skip this step when the --skip-profile install option has been given, or when the user installing MySQL Utilities has no permission. """ if self.skip_profile: log.info("Not adding shell profile %s (skipped)" % ( os.path.join(self.profile_d_dir, self.profile_filename))) return if self.root: profile_dir = change_root(self.root, self.profile_d_dir) else: profile_dir = self.profile_d_dir try: dir_util.mkpath(profile_dir) except DistutilsFileError as err: log.info("Not installing mysql-utilities.sh: {0}".format(err)) self.skip_profile = True return destfile = os.path.join(profile_dir, self.profile_filename) if not os.access(os.path.dirname(destfile), os.X_OK | os.W_OK): log.info("Not installing mysql-utilities.sh in " "{folder} (no permission)".format(folder=destfile)) self.skip_profile = True return if os.path.exists(os.path.dirname(destfile)): if os.path.isdir(destfile) and not os.path.islink(destfile): dir_util.remove_tree(destfile) elif os.path.exists(destfile): log.info("Removing {filename}".format(filename=destfile)) os.unlink(destfile) script = PROFILE_SCRIPT % (self.install_dir,) log.info("Writing {filename}".format(filename=destfile)) open(destfile, "w+").write(script) def run(self): """Run the command""" self._create_shell_profile() def get_outputs(self): """Get installed files""" outputs = _install.get_outputs(self) return outputs class build_scripts(_build_scripts): """Class for providing a customized version of build_scripts. When ``run`` is called, this command class will: 1. Create a copy of all ``.py`` files in the **scripts** option that does not have the ``.py`` extension. 2. Replace the list in the **scripts** attribute with a list consisting of the script files with the ``.py`` extension removed. 3. Call run method in `distutils.command.build_scripts`. 4. Restore the scripts list to the old value, for other commands to use.""" def run(self): if not self.scripts: return saved_scripts = self.scripts self.scripts = [] for script in saved_scripts: script = distutils.util.convert_path(script) script_copy, script_ext = os.path.splitext(script) if script_ext != '.py': log.debug("Not removing extension from {script} " "since it's not '.py'".format(script=script)) else: log.debug("Copying {orig} -> {dest}".format( orig=script, dest=script_copy)) self.copy_file(script, script_copy) self.scripts.append(script_copy) # distutils is compatible with 2.1 so we cannot use super() to # call it. _build_scripts.run(self) self.outfiles = self.scripts self.scripts = saved_scripts def get_outputs(self): """Get installed files""" return self.outfiles COMMANDS['cmdclass'].update({ 'install': install, }) # We need to edit the configuration file before installing it class install_data(_install_data): def initialize_options(self): _install_data.initialize_options(self) self.user = None self.home = None def finalize_options(self): self.set_undefined_options('install', ('user', 'user'), ('home', 'home')) _install_data.finalize_options(self) def run(self): from itertools import groupby if not self.data_files: log.info("no data files to install") return # Set up paths to write to config file install_dir = self.install_dir install_logdir = '/var/log' if self.user or self.home: install_sysconfdir = os.path.join(install_dir, 'etc') elif os.name == 'posix' and install_dir in ('/', '/usr'): install_sysconfdir = '/etc' elif os.name == 'nt': install_sysconfdir = os.path.join(install_dir, 'etc') else: install_sysconfdir = '/etc' # Go over all entries in data_files and process it if needed new_data_files = [] for df in self.data_files: # Figure out what the entry contain and collect a list of files. if isinstance(df, str): # This was just a file name, so it will be installed # in the install_dir location. This is a copy of the # behaviour inside distutils intall_data. directory = install_dir filenames = [df] else: directory = df[0] filenames = df[1] # Process all the files for the entry and build a list of # tuples (directory, file) data_files = [] for filename in filenames: # It was a config file template, add install # directories to the config file. if fnmatch.fnmatch(filename, 'data/*.cfg.in'): config = ConfigParser.RawConfigParser({ 'prefix': '', # install_dir, 'logdir': install_logdir, 'sysconfdir': install_sysconfdir, }) config.readfp(open(filename)) #filename = os.path.split(os.path.splitext(filename)[0])[1] filename = os.path.splitext(filename)[0] config.write(open(filename, "w")) # change directory 'fabric'to mysql directory = os.path.join(install_sysconfdir, 'mysql') data_files.append((directory, filename)) new_data_files.extend(data_files) # Re-construct the data_files entry from what was provided by # merging all tuples with same directory and provide a list of # files as second item, e.g.: # [('foo', 1), ('bar', 2), ('foo', 3), ('foo', 4), ('bar', 5)] # --> [('bar', [2, 5]), ('foo', [1, 3, 4])] data_files.sort() data_files = [ (d, [ f[1] for f in fs ]) for d, fs in groupby(new_data_files, key=lambda x: x[0]) ] self.data_files = data_files _install_data.run(self) COMMANDS['cmdclass'].update({ 'install_data': install_data, }) if os.name != "nt": COMMANDS['cmdclass'].update({ 'build_scripts': build_scripts, 'install_man': install_man, }) ARGS.update(META_INFO) ARGS.update(INSTALL) ARGS.update(COMMANDS) setup(**ARGS) mysql-utilities-1.6.1/PKG-INFO0000644001577100000120000000164012473641277015256 0ustar pb2userwheelMetadata-Version: 1.1 Name: mysql-utilities Version: 1.6.1 Summary: MySQL Utilities Home-page: http://dev.mysql.com Author: Oracle Author-email: UNKNOWN License: GNU GPLv2 (with FOSS License Exception) Description: UNKNOWN Keywords: mysql db Platform: UNKNOWN Classifier: Development Status :: 3 - Alpha Classifier: Programming Language :: Python :: 2.6 Classifier: Programming Language :: Python :: 2.7 Classifier: Environment :: Console Classifier: Environment :: Win32 (MS Windows) Classifier: License :: OSI Approved :: GNU General Public License (GPL) Classifier: Intended Audience :: Developers Classifier: Intended Audience :: System Administrators Classifier: Intended Audience :: Database Administrators Classifier: Operating System :: Microsoft :: Windows Classifier: Operating System :: OS Independent Classifier: Operating System :: POSIX Classifier: Topic :: Utilities Requires: distutils Provides: mysql.utilities mysql-utilities-1.6.1/README_Utilities.txt0000644001577100000120000010400312473640742017703 0ustar pb2userwheelMySQL Utilities 1.6 This is a release of MySQL Utilities, the dual-license, complete database modeling, administration and development program for MySQL. For the avoidance of doubt, this particular copy of the software is released under the version 2 of the GNU General Public License. MySQL Utilities is brought to you by the MySQL team at Oracle. Copyright (c) 2010, 2015 Oracle and/or its affiliates. All rights reserved. For more information on MySQL Utilities, visit http://www.mysql.com/products/enterprise/utilities.html For more downloads and the source of MySQL Utilities, visit http://dev.mysql.com/downloads/utilities License information can be found in the LICENSE.txt file. This distribution may include materials developed by third parties. For license and attribution notices for these materials, please refer to the documentation that accompanies this distribution. A copy of the license/notices is also reproduced below. GPLv2 Disclaimer For the avoidance of doubt, except that if any license choice other than GPL or LGPL is available it will apply instead, Oracle elects to use only the General Public License version 2 (GPLv2) at this time for any software where a choice of GPL license versions is made available with the language indicating that GPLv2 or any later version may be used, or where a choice of which version of the GPL is applied is otherwise unspecified. ******************************************************************** Third-Party Component Notices ********************************************************************* %%The following software may be included in this product: Python Use of any of this software is governed by the terms of the license below: Python 2.7 license This is the official license for the Python 2.7 release: A. HISTORY OF THE SOFTWARE ========================== Python was created in the early 1990s by Guido van Rossum at Stichting Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands as a successor of a language called ABC. Guido remains Python's principal author, although it includes many contributions from others. In 1995, Guido continued his work on Python at the Corporation for National Research Initiatives (CNRI, see http://www.cnri.reston.va.us) in Reston, Virginia where he released several versions of the software. In May 2000, Guido and the Python core development team moved to BeOpen.com to form the BeOpen PythonLabs team. In October of the same year, the PythonLabs team moved to Digital Creations (now Zope Corporation, see http://www.zope.com). In 2001, the Python Software Foundation (PSF, see http://www.python.org/psf/) was formed, a non-profit organization created specifically to own Python-related Intellectual Property. Zope Corporation is a sponsoring member of the PSF. All Python releases are Open Source (see http://www.opensource.org for the Open Source Definition). Historically, most, but not all, Python releases have also been GPL-compatible; the table below summarizes the various releases. Release Derived Year Owner GPL- from compatible? (1) 0.9.0 thru 1.2 1991-1995 CWI yes 1.3 thru 1.5.2 1.2 1995-1999 CNRI yes 1.6 1.5.2 2000 CNRI no 2.0 1.6 2000 BeOpen.com no 1.6.1 1.6 2001 CNRI yes (2) 2.1 2.0+1.6.1 2001 PSF no 2.0.1 2.0+1.6.1 2001 PSF yes 2.1.1 2.1+2.0.1 2001 PSF yes 2.2 2.1.1 2001 PSF yes 2.1.2 2.1.1 2002 PSF yes 2.1.3 2.1.2 2002 PSF yes 2.2.1 2.2 2002 PSF yes 2.2.2 2.2.1 2002 PSF yes 2.2.3 2.2.2 2003 PSF yes 2.3 2.2.2 2002-2003 PSF yes 2.3.1 2.3 2002-2003 PSF yes 2.3.2 2.3.1 2002-2003 PSF yes 2.3.3 2.3.2 2002-2003 PSF yes 2.3.4 2.3.3 2004 PSF yes 2.3.5 2.3.4 2005 PSF yes 2.4 2.3 2004 PSF yes 2.4.1 2.4 2005 PSF yes 2.4.2 2.4.1 2005 PSF yes 2.4.3 2.4.2 2006 PSF yes 2.4.4 2.4.3 2006 PSF yes 2.5 2.4 2006 PSF yes 2.5.1 2.5 2007 PSF yes 2.5.2 2.5.1 2008 PSF yes 2.5.3 2.5.2 2008 PSF yes 2.6 2.5 2008 PSF yes 2.6.1 2.6 2008 PSF yes 2.6.2 2.6.1 2009 PSF yes 2.6.3 2.6.2 2009 PSF yes 2.6.4 2.6.3 2009 PSF yes 2.6.5 2.6.4 2010 PSF yes 2.7 2.6 2010 PSF yes Footnotes: (1) GPL-compatible doesn't mean that we're distributing Python under the GPL. All Python licenses, unlike the GPL, let you distribute a modified version without making your changes open source. The GPL-compatible licenses make it possible to combine Python with other software that is released under the GPL; the others don't. (2) According to Richard Stallman, 1.6.1 is not GPL-compatible, because its license has a choice of law clause. According to CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1 is "not incompatible" with the GPL. Thanks to the many outside volunteers who have worked under Guido's direction to make these releases possible. B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON =============================================================== PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 -------------------------------------------- 1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and the Individual or Organization ("Licensee") accessing and otherwise using this software ("Python") in source or binary form and its associated documentation. 2. Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Python Software Foundation; All Rights Reserved" are retained in Python alone or in any derivative version prepared by Licensee. 3. In the event Licensee prepares a derivative work that is based on or incorporates Python or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python. 4. PSF is making Python available to Licensee on an "AS IS" basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. 6. This License Agreement will automatically terminate upon a material breach of its terms and conditions. 7. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between PSF and Licensee. This License Agreement does not grant permission to use PSF trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. 8. By copying, installing or otherwise using Python, Licensee agrees to be bound by the terms and conditions of this License Agreement. BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0 ------------------------------------------- BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1 1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the Individual or Organization ("Licensee") accessing and otherwise using this software in source or binary form and its associated documentation ("the Software"). 2. Subject to the terms and conditions of this BeOpen Python License Agreement, BeOpen hereby grants Licensee a non-exclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use the Software alone or in any derivative version, provided, however, that the BeOpen Python License is retained in the Software, alone or in any derivative version prepared by Licensee. 3. BeOpen is making the Software available to Licensee on an "AS IS" basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. 4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. 5. This License Agreement will automatically terminate upon a material breach of its terms and conditions. 6. This License Agreement shall be governed by and interpreted in all respects by the law of the State of California, excluding conflict of law provisions. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between BeOpen and Licensee. This License Agreement does not grant permission to use BeOpen trademarks or trade names in a trademark sense to endorse or promote products or services of Licensee, or any third party. As an exception, the "BeOpen Python" logos available at http://www.pythonlabs.com/logos.html may be used according to the permissions granted on that web page. 7. By copying, installing or otherwise using the software, Licensee agrees to be bound by the terms and conditions of this License Agreement. CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1 --------------------------------------- 1. This LICENSE AGREEMENT is between the Corporation for National Research Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191 ("CNRI"), and the Individual or Organization ("Licensee") accessing and otherwise using Python 1.6.1 software in source or binary form and its associated documentation. 2. Subject to the terms and conditions of this License Agreement, CNRI hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python 1.6.1 alone or in any derivative version, provided, however, that CNRI's License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) 1995-2001 Corporation for National Research Initiatives; All Rights Reserved" are retained in Python 1.6.1 alone or in any derivative version prepared by Licensee. Alternately, in lieu of CNRI's License Agreement, Licensee may substitute the following text (omitting the quotes): "Python 1.6.1 is made available subject to the terms and conditions in CNRI's License Agreement. This Agreement together with Python 1.6.1 may be located on the Internet using the following unique, persistent identifier (known as a handle): 1895.22/1013. This Agreement may also be obtained from a proxy server on the Internet using the following URL: http://hdl.handle.net/1895.22/1013". 3. In the event Licensee prepares a derivative work that is based on or incorporates Python 1.6.1 or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python 1.6.1. 4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. 5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. 6. This License Agreement will automatically terminate upon a material breach of its terms and conditions. 7. This License Agreement shall be governed by the federal intellectual property law of the United States, including without limitation the federal copyright law, and, to the extent such U.S. federal law does not apply, by the law of the Commonwealth of Virginia, excluding Virginia's conflict of law provisions. Notwithstanding the foregoing, with regard to derivative works based on Python 1.6.1 that incorporate non-separable material that was previously distributed under the GNU General Public License (GPL), the law of the Commonwealth of Virginia shall govern this License Agreement only as to issues arising under or with respect to Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between CNRI and Licensee. This License Agreement does not grant permission to use CNRI trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. 8. By clicking on the "ACCEPT" button where indicated, or by copying, installing or otherwise using Python 1.6.1, Licensee agrees to be bound by the terms and conditions of this License Agreement. ACCEPT CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2 -------------------------------------------------- Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, The Netherlands. All rights reserved. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Stichting Mathematisch Centrum or CWI not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. Additional Conditions for this Windows binary build --------------------------------------------------- This program is linked with and uses Microsoft Distributable Code, copyrighted by Microsoft Corporation. The Microsoft Distributable Code includes the following files: msvcr90.dll msvcp90.dll msvcm90.dll If you further distribute programs that include the Microsoft Distributable Code, you must comply with the restrictions on distribution specified by Microsoft. In particular, you must require distributors and external end users to agree to terms that protect the Microsoft Distributable Code at least as much as Microsoft's own requirements for the Distributable Code. See Microsoft's documentation (included in its developer tools and on its website at microsoft.com) for specific details. Redistribution of the Windows binary build of the Python interpreter complies with this agreement, provided that you do not: - alter any copyright, trademark or patent notice in Microsoft's Distributable Code; - use Microsoft's trademarks in your programs' names or in a way that suggests your programs come from or are endorsed by Microsoft; - distribute Microsoft's Distributable Code to run on a platform other than Microsoft operating systems, run-time technologies or application platforms; or - include Microsoft Distributable Code in malicious, deceptive or unlawful programs. These restrictions apply only to the Microsoft Distributable Code as defined above, not to Python itself or any programs running on the Python interpreter. The redistribution of the Python interpreter and libraries is governed by the Python Software License included with this file, or by other licenses as marked. This copy of Python includes a copy of bzip2, which is licensed under the following terms: -------------------------------------------------------------------------- This program, "bzip2", the associated library "libbzip2", and all documentation, are copyright (C) 1996-2007 Julian R Seward. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 3. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 4. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Julian Seward, jseward@bzip.org bzip2/libbzip2 version 1.0.5 of 10 December 2007 -------------------------------------------------------------------------- This copy of Python includes a copy of Berkeley DB, which is licensed under the following terms: /*- * $Id: LICENSE,v 12.9 2008/02/07 17:12:17 mark Exp $ */ The following is the license that applies to this copy of the Berkeley DB software. For a license to use the Berkeley DB software under conditions other than those described here, or to purchase support for this software, please contact Oracle at berkeleydb-info_us@oracle.com. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= /* * Copyright (c) 1990,2008 Oracle. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Redistributions in any form must be accompanied by information on * how to obtain complete source code for the DB software and any * accompanying software that uses the DB software. The source code * must either be included in the distribution or be available for no * more than the cost of distribution plus a nominal fee, and must be * freely redistributable under reasonable conditions. For an * executable file, complete source code means the source code for all * modules it contains. It does not include source code for modules or * files that typically accompany the major components of the operating * system on which the executable file runs. * * THIS SOFTWARE IS PROVIDED BY ORACLE ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR * NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL ORACLE BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * Copyright (c) 1990, 1993, 1994, 1995 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * Copyright (c) 1995, 1996 * The President and Fellows of Harvard University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY HARVARD AND ITS CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HARVARD OR ITS CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= /*** * ASM: a very small and fast Java bytecode manipulation framework * Copyright (c) 2000-2005 INRIA, France Telecom * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holders nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ This copy of Python includes a copy of Tcl, which is licensed under the following terms: This software is copyrighted by the Regents of the University of California, Sun Microsystems, Inc., Scriptics Corporation, ActiveState Corporation and other parties. The following terms apply to all files associated with the software unless explicitly disclaimed in individual files. The authors hereby grant permission to use, copy, modify, distribute, and license this software and its documentation for any purpose, provided that existing copyright notices are retained in all copies and that this notice is included verbatim in any distributions. No written agreement, license, or royalty fee is required for any of the authorized uses. Modifications to this software may be copyrighted by their authors and need not follow the licensing terms described here, provided that the new terms are clearly indicated on the first page of each file where they apply. IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. GOVERNMENT USE: If you are acquiring this software on behalf of the U.S. government, the Government shall have only "Restricted Rights" in the software and related documentation as defined in the Federal Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you are acquiring the software on behalf of the Department of Defense, the software shall be classified as "Commercial Computer Software" and the Government shall have only "Restricted Rights" as defined in Clause 252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the authors grant the U.S. Government and others acting in its behalf permission to use and distribute the software in accordance with the terms specified in this license. This copy of Python includes a copy of Tk, which is licensed under the following terms: This software is copyrighted by the Regents of the University of California, Sun Microsystems, Inc., and other parties. The following terms apply to all files associated with the software unless explicitly disclaimed in individual files. The authors hereby grant permission to use, copy, modify, distribute, and license this software and its documentation for any purpose, provided that existing copyright notices are retained in all copies and that this notice is included verbatim in any distributions. No written agreement, license, or royalty fee is required for any of the authorized uses. Modifications to this software may be copyrighted by their authors and need not follow the licensing terms described here, provided that the new terms are clearly indicated on the first page of each file where they apply. IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. GOVERNMENT USE: If you are acquiring this software on behalf of the U.S. government, the Government shall have only "Restricted Rights" in the software and related documentation as defined in the Federal Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you are acquiring the software on behalf of the Department of Defense, the software shall be classified as "Commercial Computer Software" and the Government shall have only "Restricted Rights" as defined in Clause 252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the authors grant the U.S. Government and others acting in its behalf permission to use and distribute the software in accordance with the terms specified in this license. This copy of Python includes a copy of Tix, which is licensed under the following terms: Copyright (c) 1993-1999 Ioi Kim Lam. Copyright (c) 2000-2001 Tix Project Group. Copyright (c) 2004 ActiveState This software is copyrighted by the above entities and other parties. The following terms apply to all files associated with the software unless explicitly disclaimed in individual files. The authors hereby grant permission to use, copy, modify, distribute, and license this software and its documentation for any purpose, provided that existing copyright notices are retained in all copies and that this notice is included verbatim in any distributions. No written agreement, license, or royalty fee is required for any of the authorized uses. Modifications to this software may be copyrighted by their authors and need not follow the licensing terms described here, provided that the new terms are clearly indicated on the first page of each file where they apply. IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. GOVERNMENT USE: If you are acquiring this software on behalf of the U.S. government, the Government shall have only "Restricted Rights" in the software and related documentation as defined in the Federal Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you are acquiring the software on behalf of the Department of Defense, the software shall be classified as "Commercial Computer Software" and the Government shall have only "Restricted Rights" as defined in Clause 252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the authors grant the U.S. Government and others acting in its behalf permission to use and distribute the software in accordance with the terms specified in this license. ---------------------------------------------------------------------- Parts of this software are based on the Tcl/Tk software copyrighted by the Regents of the University of California, Sun Microsystems, Inc., and other parties. The original license terms of the Tcl/Tk software distribution is included in the file docs/license.tcltk. Parts of this software are based on the HTML Library software copyrighted by Sun Microsystems, Inc. The original license terms of the HTML Library software distribution is included in the file docs/license.html_lib. ***************************************************************** mysql-utilities-1.6.1/docs/0000755001577100000120000000000012473641277015110 5ustar pb2userwheelmysql-utilities-1.6.1/docs/man/0000755001577100000120000000000012473641277015663 5ustar pb2userwheelmysql-utilities-1.6.1/docs/man/mysqldbcopy.10000644001577100000120000004274012473641047020315 0ustar pb2userwheel'\" t .\" Title: \fBmysqldbcopy\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 10/03/2013 .\" Manual: MySQL Utilities .\" Source: MySQL 1.4.0 .\" Language: English .\" .TH "\FBMYSQLDBCOPY\FR" "1" "10/03/2013" "MySQL 1\&.4\&.0" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .\" mysqldbcopy .\" utilities: mysqldbcopy .\" scripts .SH "NAME" mysqldbcopy \- Copy Database Objects Between Servers .SH "SYNOPSIS" .HP \w'\fBmysqldbcopy\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIdb_name\fR\fR\fB\ [\fR\fB\fI:new_db_name\fR\fR\fB]\fR\ 'u \fBmysqldbcopy [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIdb_name\fR\fR\fB [\fR\fB\fI:new_db_name\fR\fR\fB]\fR .SH "DESCRIPTION" .PP This utility copies a database on a source server to a database on a destination server\&. If the source and destination servers are different, the database names can be the same or different\&. If the source and destination servers are the same, the database names must be different\&. .PP The utility accepts one or more database pairs on the command line\&. To name a database pair, use \fIdb_name\fR:\fInew_db_name\fR syntax to specify the source and destination names explicitly\&. If the source and destination database names are the same, \fIdb_name\fR can be used as shorthand for \fIdb_name\fR:\fIdb_name\fR\&. .PP By default, the operation copies all objects (tables, views, triggers, events, procedures, functions, and database\-level grants) and data to the destination server\&. There are options to turn off copying any or all of the objects as well as not copying the data\&. .PP To exclude specific objects by name, use the \fB\-\-exclude\fR option with a name in \fIdb\fR\&.*obj* format, or you can supply a search pattern\&. For example, \fB\-\-exclude=db1\&.trig1\fR excludes the single trigger and \fB\-\-exclude=trig_\fR excludes all objects from all databases having a name that begins with trig and has a following character\&. .PP By default, the utility creates each table on the destination server using the same storage engine as the original table\&. To override this and specify the storage engine to use for all tables created on the destination server, use the \fB\-\-new\-storage\-engine\fR option\&. If the destination server supports the new engine, all tables use that engine\&. .PP To specify the storage engine to use for tables for which the destination server does not support the original storage engine on the source server, use the \fB\-\-default\-storage\-engine\fR option\&. .PP The \fB\-\-new\-storage\-engine\fR option takes precedence over \fB\-\-default\-storage\-engine\fR if both are given\&. .PP If the \fB\-\-new\-storage\-engine\fR or \fB\-\-default\-storage\-engine\fR option is given and the destination server does not support the specified storage engine, a warning is issued and the server\*(Aqs default storage engine setting is used instead\&. .PP By default, the operation uses a consistent snapshot to read the source databases\&. To change the locking mode, use the \fB\-\-locking\fR option with a locking type value\&. Use a value of \fBno\-locks\fR to turn off locking altogether or \fBlock\-all\fR to use only table locks\&. The default value is \fBsnapshot\fR\&. Additionally, the utility uses WRITE locks to lock the destination tables during the copy\&. .PP You can include replication statements for copying data among a master and slave or between slaves\&. The \fB\-\-rpl\fR option permits you to select from the following replication statements to include in the export\&. .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBmaster\fR .sp Include the \fBCHANGE MASTER\fR statement to start a new slave with the current server acting as the master\&. This executes the appropriate STOP and START slave statements\&. The \fBSTOP SLAVE\fR statement is executed at the start of the copy and the \fBCHANGE MASTER\fR followed by the \fBSTART SLAVE\fR statements are executed after the copy\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBslave\fR .sp Include the \fBCHANGE MASTER\fR statement to start a new slave using the current server\*(Aqs master information\&. This executes the appropriate STOP and START slave statements\&. The STOP SLAVE statement is executed at the start of the copy and the \fBCHANGE MASTER\fR followed by the \fBSTART SLAVE\fR statements follow the copy\&. .RE .PP To include the replication user in the \fBCHANGE MASTER\fR statement, use the \fB\-\-rpl\-user\fR option to specify the user and password\&. If this option is omitted, the utility attempts to identify the replication user\&. In the event that there are multiple candidates or the user requires a password, the utility aborts with an error\&. .PP If you attempt to copy databases on a server with GTIDs enabled (GTID_MODE = ON), a warning will be generated if the copy does not include all databases\&. This is because the GTID statements generated include the GTIDs for all databases and not only those databases in the export\&. .PP The utility will also generate a warning if you copy databases on a GTID enabled server but use the \fB\-\-skip\-gtid \fR option\&. .PP To make the most use of GTIDs, you should copy all of the databases on the server with the \fB\-\-all\fR option\&. OPTIONS .PP \fBmysqldbcopy\fR accepts the following command\-line options: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-help .sp Display a help message and exit\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-default\-storage\-engine= .sp The engine to use for tables if the destination server does not support the original storage engine on the source server\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-destination= .sp Connection information for the destination server in the format: <\fIuser\fR>[:<\fIpasswd\fR>]@<\fIhost\fR>[:<\fIport\fR>][:<\fIsocket\fR>] or <\fIlogin\-path\fR>[:<\fIport\fR>][:<\fIsocket\fR>] (where is optional and either or must be provided)\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-exclude=, \-x .sp Exclude one or more objects from the operation using either a specific name such as db1\&.t1 or a search pattern\&. Use this option multiple times to specify multiple exclusions\&. By default, patterns use \fBLIKE\fR matching\&. With the \fB\-\-regexp\fR option, patterns use \fBREGEXP\fR matching\&. .sp This option does not apply to grants\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-force .sp Drop each database to be copied if exists before copying anything into it\&. Without this option, an error occurs if you attempt to copy objects into an existing database\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-locking= .sp Choose the lock type for the operation\&. Permitted lock values are \fBno\-locks\fR (do not use any table locks), \fBlock\-all\fR (use table locks but no transaction and no consistent read), and \fBsnapshot\fR (consistent read using a single transaction)\&. The default is \fBsnapshot\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-new\-storage\-engine= .sp The engine to use for all tables created on the destination server\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-quiet, \-q .sp Turn off all messages for quiet execution\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-regexp, \-\-basic\-regexp, \-G .sp Perform pattern matches using the \fBREGEXP\fR operator\&. The default is to use \fBLIKE\fR for matching\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-rpl=, \-\-replication= .sp Include replication information\&. Permitted values are \fBmaster\fR (include the \fBCHANGE MASTER\fR statement using the source server as the master), \fBslave\fR (include the \fBCHANGE MASTER\fR statement using the destination server\*(Aqs master information), and \fBboth\fR (include the \fBmaster\fR and \fBslave\fR options where applicable)\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-rpl\-user= .sp The user and password for the replication user requirement in the form: <\fIuser\fR>[:<\fIpassword\fR>] or <\fIlogin\-path\fR>\&. E\&.g\&. rpl:passwd Default = None\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} l \-\-skip\-gtid .sp Skip creation and execution of GTID statements during the copy operation\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-all .sp Copy all of the databases on the server\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-skip= .sp Specify objects to skip in the operation as a comma\-separated list (no spaces)\&. Permitted values are \fBCREATE_DB\fR, \fBDATA\fR, \fBEVENTS\fR, \fBFUNCTIONS\fR, \fBGRANTS\fR, \fBPROCEDURES\fR, \fBTABLES\fR, \fBTRIGGERS\fR, and \fBVIEWS\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-source= .sp Connection information for the destination server in the format: <\fIuser\fR>[:<\fIpasswd\fR>]@<\fIhost\fR>[:<\fIport\fR>][:<\fIsocket\fR>] or <\fIlogin\-path\fR>[::<\fIport\fR>][::<\fIsocket\fR>] (where is optional and either or must be provided)\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-threads .sp Use multiple threads for cross\-server copy\&. The default is 1\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-verbose, \-v .sp Specify how much information to display\&. Use this option multiple times to increase the amount of information\&. For example, \fB\-v\fR = verbose, \fB\-vv\fR = more verbose, \fB\-vvv\fR = debug\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-version .sp Display version information and exit\&. .RE NOTES .PP You must provide connection parameters (user, host, password, and so forth) for an account that has the appropriate privileges to access all objects in the operation\&. .PP To copy all objects from a source, the user must have these privileges: \fBSELECT\fR and \fBSHOW VIEW\fR for the database, and \fBSELECT\fR for the mysql database\&. .PP To copy all objects to a destination, the user must have these privileges: \fBCREATE\fR for the database, \fBSUPER\fR (when binary logging is enabled) for procedures and functions, and \fBGRANT OPTION\fR to copy grants\&. .PP Actual privileges required may differ from installation to installation depending on the security privileges present and whether the database contains certain objects such as views or events and whether binary logging is enabled\&. .PP The \fB\-\-new\-storage\-engine\fR and \fB\-\-default\-storage\-engine\fR options apply to all destination tables in the operation\&. .PP Some option combinations may result in errors during the operation\&. For example, eliminating tables but not views may result in an error a the view is copied\&. .PP The \fB\-\-rpl\fR option is not valid for copying databases on the same server\&. An error will be generated\&. .PP When copying data and including the GTID commands, you may encounter an error similar to "GTID_PURGED can only be set when GTID_EXECUTED is empty"\&. This occurs because the destination server is not in a clean replication state\&. To aleviate this problem, you can issue a "RESET MASTER" command on the destination prior to executing the copy\&. .PP Cloning databases that contain foreign key constraints does not change the constraint in the cloned table\&. For example, if table db1\&.t1 has a foreign key constraint on table db1\&.t2, when db1 is cloned to db2, table db2\&.t1 will have a foreign key constraint on db1\&.t2\&. .PP The path to the MySQL client tools should be included in the PATH environment variable in order to use the authentication mechanism with login\-paths\&. This will allow the utility to use the my_print_defaults tools which is required to read the login\-path values from the login configuration file (\&.mylogin\&.cnf)\&. .PP If any database identifier specified as an argument contains special characters or is a reserved word, then it must be appropriately quoted with backticks (\fB`\fR)\&. In turn, names quoted with backticks must also be quoted with single or double quotes depending on the operating system, i\&.e\&. (\fB"\fR) in Windows or (\fB\*(Aq\fR) in non\-Windows systems, in order for the utilities to read backtick quoted identifiers as a single argument\&. For example, to copy a database with the name \fBweird`db\&.name\fR with \fBother:weird`db\&.name\fR, the database pair must be specified using the following syntax (in non\-Windows): \fB\*(Aq`weird``db\&.name`:`other:weird``db\&.name`\*(Aq\fR\&. EXAMPLES .PP The following example demonstrates how to use the utility to copy a database named util_test to a new database named util_test_copy on the same server: .sp .if n \{\ .RS 4 .\} .nf $ mysqldbcopy \e \-\-source=root:pass@localhost:3310:/test123/mysql\&.sock \e \-\-destination=root:pass@localhost:3310:/test123/mysql\&.sock \e util_test:util_test_copy # Source on localhost: \&.\&.\&. connected\&. # Destination on localhost: \&.\&.\&. connected\&. # Copying database util_test renamed as util_test_copy # Copying TABLE util_test\&.t1 # Copying table data\&. # Copying TABLE util_test\&.t2 # Copying table data\&. # Copying TABLE util_test\&.t3 # Copying table data\&. # Copying TABLE util_test\&.t4 # Copying table data\&. # Copying VIEW util_test\&.v1 # Copying TRIGGER util_test\&.trg # Copying PROCEDURE util_test\&.p1 # Copying FUNCTION util_test\&.f1 # Copying EVENT util_test\&.e1 # Copying GRANTS from util_test #\&.\&.\&.done\&. .fi .if n \{\ .RE .\} .PP If the database to be copied does not contain only InnoDB tables and you want to ensure data integrity of the copied data by locking the tables during the read step, add a \fB\-\-locking=lock\-all\fR option to the command: .sp .if n \{\ .RS 4 .\} .nf $ mysqldbcopy \e \-\-source=root:pass@localhost:3310:/test123/mysql\&.sock \e \-\-destination=root:pass@localhost:3310:/test123/mysql\&.sock \e util_test:util_test_copy \-\-locking=lock\-all # Source on localhost: \&.\&.\&. connected\&. # Destination on localhost: \&.\&.\&. connected\&. # Copying database util_test renamed as util_test_copy # Copying TABLE util_test\&.t1 # Copying table data\&. # Copying TABLE util_test\&.t2 # Copying table data\&. # Copying TABLE util_test\&.t3 # Copying table data\&. # Copying TABLE util_test\&.t4 # Copying table data\&. # Copying VIEW util_test\&.v1 # Copying TRIGGER util_test\&.trg # Copying PROCEDURE util_test\&.p1 # Copying FUNCTION util_test\&.f1 # Copying EVENT util_test\&.e1 # Copying GRANTS from util_test #\&.\&.\&.done\&. .fi .if n \{\ .RE .\} .PP To copy one or more databases from a master to a slave, you can use the following command to copy the databases\&. Use the master as the source and the slave as the destination: .sp .if n \{\ .RS 4 .\} .nf $ mysqldbcopy \-\-source=root@localhost:3310 \e \-\-destination=root@localhost:3311 test123 \-\-rpl=master \e \-\-rpl\-user=rpl # Source on localhost: \&.\&.\&. connected\&. # Destination on localhost: \&.\&.\&. connected\&. # Source on localhost: \&.\&.\&. connected\&. # Stopping slave # Copying database test123 # Copying TABLE test123\&.t1 # Copying data for TABLE test123\&.t1 # Connecting to the current server as master # Starting slave #\&.\&.\&.done\&. .fi .if n \{\ .RE .\} .PP To copy a database from one slave to another attached to the same master, you can use the following command using the slave with the database to be copied as the source and the slave where the database needs to copied to as the destination: .sp .if n \{\ .RS 4 .\} .nf $ mysqldbcopy \-\-source=root@localhost:3311 \e \-\-destination=root@localhost:3312 test123 \-\-rpl=slave \e \-\-rpl\-user=rpl # Source on localhost: \&.\&.\&. connected\&. # Destination on localhost: \&.\&.\&. connected\&. # Source on localhost: \&.\&.\&. connected\&. # Stopping slave # Copying database test123 # Copying TABLE test123\&.t1 # Copying data for TABLE test123\&.t1 # Connecting to the current server\*(Aqs master # Starting slave #\&.\&.\&.done\&. .fi .if n \{\ .RE .\} .SH "COPYRIGHT" .br .SH "SEE ALSO" For more information, please refer to the MySQL Utilities section of the MySQL Workbench Reference Manual, which is available online at http://dev.mysql.com/doc/workbench/en/. .SH AUTHOR Oracle Corporation (http://dev.mysql.com/). mysql-utilities-1.6.1/docs/man/mysqldbexport.10000644001577100000120000005756612473641047020700 0ustar pb2userwheel'\" t .\" Title: \fBmysqldbexport\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 10/03/2013 .\" Manual: MySQL Utilities .\" Source: MySQL 1.4.0 .\" Language: English .\" .TH "\FBMYSQLDBEXPORT\FR" "1" "10/03/2013" "MySQL 1\&.4\&.0" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .\" mysqldbexport .\" utilities: mysqldbexport .\" scripts .SH "NAME" mysqldbexport \- Export Object Definitions or Data from a Database .SH "SYNOPSIS" .HP \w'\fBmysqldbexport\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIdb_name\fR\fR\fB\ \&.\&.\&.\fR\ 'u \fBmysqldbexport [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIdb_name\fR\fR\fB \&.\&.\&.\fR .SH "DESCRIPTION" .PP This utility exports metadata (object definitions) or data or both from one or more databases\&. By default, the export includes only definitions\&. .PP \fBmysqldbexport\fR differs from \fBmysqldump\fR in that it can produce output in a variety of formats to make your data extraction/transport much easier\&. It permits you to export your data in the format most suitable to an external tool, another MySQL server, or other use without the need to reformat the data\&. .PP To exclude specific objects by name, use the \fB\-\-exclude\fR option with a name in \fIdb\fR\&.*obj* format, or you can supply a search pattern\&. For example, \fB\-\-exclude=db1\&.trig1\fR excludes the single trigger and \fB\-\-exclude=trig_\fR excludes all objects from all databases having a name that begins with trig and has a following character\&. .PP To skip objects by type, use the \fB\-\-skip\fR option with a list of the objects to skip\&. This enables you to extract a particular set of objects, say, for exporting only events (by excluding all other types)\&. Similarly, to skip creation of \fBUPDATE\fR statements for BLOB data, specify the \fB\-\-skip\-blobs\fR option\&. .PP To specify how to display output, use one of the following values with the \fB\-\-format\fR option: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBsql\fR (default) .sp Display output using SQL statements\&. For definitions, this consists of the appropriate \fBCREATE\fR and \fBGRANT\fR statements\&. For data, this is an \fBINSERT\fR statement (or bulk insert if the \fB\-\-bulk\-insert\fR option is specified)\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBgrid\fR .sp Display output in grid or table format like that of the \fBmysql\fR monitor\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBcsv\fR .sp Display output in comma\-separated values format\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBtab\fR .sp Display output in tab\-separated format\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBvertical\fR .sp Display output in single\-column format like that of the \eG command for the \fBmysql\fR monitor\&. .RE .PP To specify how much data to display, use one of the following values with the \fB\-\-display\fR option: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBbrief\fR .sp Display only the minimal columns for recreating the objects\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBfull\fR .sp Display the complete column list for recreating the objects\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBnames\fR .sp Display only the object names\&. .RE .PP Note: For SQL\-format output, the \fB\-\-display\fR option is ignored\&. .PP To turn off the headers for \fBcsv\fR or \fBtab\fR display format, specify the \fB\-\-no\-headers\fR option\&. .PP To turn off all feedback information, specify the \fB\-\-quiet\fR option\&. .PP To write the data for individual tables to separate files, use the \fB\-\-file\-per\-table\fR option\&. The name of each file is composed of the database and table names followed by the file format\&. For example, the following command produces files named db1\&.*table_name*\&.csv: .sp .if n \{\ .RS 4 .\} .nf mysqldbexport \-\-server=root@server1:3306 \-\-format=csv db1 \-\-export=data .fi .if n \{\ .RE .\} .PP By default, the operation uses a consistent snapshot to read the source databases\&. To change the locking mode, use the \fB\-\-locking\fR option with a locking type value\&. Use a value of \fBno\-locks\fR to turn off locking altogether or \fBlock\-all\fR to use only table locks\&. The default value is \fBsnapshot\fR\&. Additionally, the utility uses WRITE locks to lock the destination tables during the copy\&. .PP You can include replication statements for exporting data among a master and slave or between slaves\&. The \fB\-\-rpl\fR option permits you to select from the following replication statements to include in the export\&. .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBmaster\fR .sp Include the \fBCHANGE MASTER\fR statement to start a new slave with the current server acting as the master\&. This places the appropriate STOP and START slave statements in the export whereby the \fBSTOP SLAVE\fR statement is placed at the start of the export and the \fBCHANGE MASTER\fR followed by the \fBSTART SLAVE\fR statements are placed after the export stream\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBslave\fR .sp Include the \fBCHANGE MASTER\fR statement to start a new slave using the current server\*(Aqs master information\&. This places the appropriate STOP and START slave statements in the export whereby the \fBSTOP SLAVE\fR statement is placed at the start of the export and the \fBCHANGE MASTER\fR followed by the \fBSTART SLAVE\fR statements are placed after the export stream\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBboth\fR .sp Include both the \*(Aqmaster\*(Aq and \*(Aqslave\*(Aq information for \fBCHANGE MASTER\fR statements for either spawning a new slave with the current server\*(Aqs master or using the current server as the master\&. All statements generated are labeled and commented to enable the user to choose which to include when imported\&. .RE .PP To include the replication user in the \fBCHANGE MASTER\fR statement, use the \fB\-\-rpl\-user\fR option to specify the user and password\&. If this option is omitted, the utility attempts to identify the replication user\&. In the event that there are multiple candidates or the user requires a password, these statements are placed inside comments for the \fBCHANGE MASTER\fR statement\&. .PP You can also use the \fB\-\-comment\-rpl\fR option to place the replication statements inside comments for later examination\&. .PP If you specify the \fB\-\-rpl\-file\fR option, the utility writes the replication statements to the file specified instead of including them in the export stream\&. .PP If you attempt to export databases on a server with GTIDs enabled (GTID_MODE = ON), a warning will be generated if the export does not include all databases\&. This is because the GTID statements generated include the GTIDs for all databases and not only those databases in the export\&. .PP The utility will also generate a warning if you export databases on a GTID enabled server but use the \fB\-\-skip\-gtid \fR option\&. .PP To make the most use of GTIDs and export/import, you should export all of the databases on the server with the \fB\-\-all\fR option\&. This will generate an export file with all of the databases and the GTIDs executed to that point\&. .PP Importing this file on another server will ensure that server has all of the data as well as all of the GTIDs recorded correctly in its logs\&. OPTIONS .PP \fBmysqldbexport\fR accepts the following command\-line options: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-help .sp Display a help message and exit\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-bulk\-insert, \-b .sp Use bulk insert statements for data\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-comment\-rpl .sp Place the replication statements in comment statements\&. Valid only with the \fB\-\-rpl\fR option\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-display=, \-d .sp Control the number of columns shown\&. Permitted display values are \fBbrief\fR (minimal columns for object creation), \fBfull* (all columns), and **names\fR (only object names; not valid for \fB\-\-format=sql\fR)\&. The default is \fBbrief\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-exclude=, \-x .sp Exclude one or more objects from the operation using either a specific name such as db1\&.t1 or a search pattern\&. Use this option multiple times to specify multiple exclusions\&. By default, patterns use \fBLIKE\fR matching\&. With the \fB\-\-regexp\fR option, patterns use \fBREGEXP\fR matching\&. .sp This option does not apply to grants\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-export=, \-e .sp Specify the export format\&. Permitted format values are \fBdefinitions\fR = export only the definitions (metadata) for the objects in the database list, \fBdata\fR = export only the table data for the tables in the database list, and \fBboth\fR = export the definitions and the data\&. The default is \fBdefinitions\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-file\-per\-table .sp Write table data to separate files\&. This is Valid only if the export output includes data (that is, if \fB\-\-export=data\fR or \fB\-\-export=both\fR are given)\&. This option produces files named \fIdb_name\fR\&.*tbl_name*\&.*format*\&. For example, a \fBcsv\fR export of two tables named t1 and t2 in database d1, results in files named db1\&.t1\&.csv and db1\&.t2\&.csv\&. If table definitions are included in the export, they are written to stdout as usual\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-format=, \-f .sp Specify the output display format\&. Permitted format values are \fBsql\fR, \fBgrid\fR, \fBtab\fR, \fBcsv\fR, and \fBvertical\fR\&. The default is \fBsql\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-locking= .sp Choose the lock type for the operation\&. Permitted lock values are \fBno\-locks\fR (do not use any table locks), \fBlock\-all\fR (use table locks but no transaction and no consistent read), and \fBsnapshot\fR (consistent read using a single transaction)\&. The default is \fBsnapshot\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-no\-headers, \-h .sp Do not display column headers\&. This option applies only for \fBcsv\fR and \fBtab\fR output\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-quiet, \-q .sp Turn off all messages for quiet execution\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-regexp, \-\-basic\-regexp, \-G .sp Perform pattern matches using the \fBREGEXP\fR operator\&. The default is to use \fBLIKE\fR for matching\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-rpl=, \-\-replication= .sp Include replication information\&. Permitted values are \fBmaster\fR (include the \fBCHANGE MASTER\fR statement using the source server as the master), \fBslave\fR (include the \fBCHANGE MASTER\fR statement using the destination server\*(Aqs master information), and \fBboth\fR (include the \fBmaster\fR and \fBslave\fR options where applicable)\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-rpl\-file=RPL_FILE, \-\-replication\-file=RPL_FILE .sp The path and file name where the generated replication information should be written\&. Valid only with the \fB\-\-rpl\fR option\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-rpl\-user= .sp The user and password for the replication user requirement, in the format: <\fIuser\fR>[:<\fIpassword\fR>] or <\fIlogin\-path\fR>\&. For example, rpl:passwd\&. The default is None\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-server= .sp Connection information for the server in <\fIuser\fR>[:<\fIpasswd\fR>]@<\fIhost\fR>[:<\fIport\fR>][:<\fIsocket\fR>] or <\fIlogin\-path\fR>[::<\fIport\fR>][::<\fIsocket\fR>]\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-skip= .sp Specify objects to skip in the operation as a comma\-separated list (no spaces)\&. Permitted values are \fBCREATE_DB\fR, \fBDATA\fR, \fBEVENTS\fR, \fBFUNCTIONS\fR, \fBGRANTS\fR, \fBPROCEDURES\fR, \fBTABLES\fR, \fBTRIGGERS\fR, and \fBVIEWS\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-skip\-blobs .sp Do not export BLOB data\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-skip\-gtid .sp Skip creation of GTID_PURGED statements\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-all .sp Generate an export file with all of the databases and the GTIDs executed to that point\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-verbose, \-v .sp Specify how much information to display\&. Use this option multiple times to increase the amount of information\&. For example, \fB\-v\fR = verbose, \fB\-vv\fR = more verbose, \fB\-vvv\fR = debug\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-version .sp Display version information and exit\&. .RE NOTES .PP You must provide connection parameters (user, host, password, and so forth) for an account that has the appropriate privileges to access all objects in the operation\&. .PP To export all objects from a source database, the user must have these privileges: \fBSELECT\fR and \fBSHOW VIEW\fR on the database as well as \fBSELECT\fR on the mysql database\&. .PP Actual privileges needed may differ from installation to installation depending on the security privileges present and whether the database contains certain objects such as views or events\&. .PP Some combinations of the options may result in errors when the export is imported later\&. For example, eliminating tables but not views may result in an error when a view is imported on another server\&. .PP For the \fB\-\-format\fR, \fB\-\-export\fR, and \fB\-\-display\fR options, the permitted values are not case sensitive\&. In addition, values may be specified as any unambiguous prefix of a valid value\&. For example, \fB\-\-format=g\fR specifies the grid format\&. An error occurs if a prefix matches more than one valid value\&. .PP The path to the MySQL client tools should be included in the PATH environment variable in order to use the authentication mechanism with login\-paths\&. This will allow the utility to use the my_print_defaults tools which is required to read the login\-path values from the login configuration file (\&.mylogin\&.cnf)\&. .PP If any database identifier specified as an argument contains special characters or is a reserved word, then it must be appropriately quoted with backticks (\fB`\fR)\&. In turn, names quoted with backticks must also be quoted with single or double quotes depending on the operating system, i\&.e\&. (\fB"\fR) in Windows or (\fB\*(Aq\fR) in non\-Windows systems, in order for the utilities to read backtick quoted identifiers as a single argument\&. For example, to export a database with the name \fBweird`db\&.name\fR, it must be specified as argument using the following syntax (in non\-Windows): \fB\*(Aq`weird``db\&.name`\*(Aq\fR\&. EXAMPLES .PP To export the definitions of the database dev from a MySQL server on the local host via port 3306, producing output consisting of \fBCREATE\fR statements, use this command: .sp .if n \{\ .RS 4 .\} .nf $ mysqldbexport \-\-server=root:pass@localhost \e \-\-skip=GRANTS \-\-export=DEFINITIONS util_test # Source on localhost: \&.\&.\&. connected\&. # Exporting metadata from util_test DROP DATABASE IF EXISTS util_test; CREATE DATABASE util_test; USE util_test; # TABLE: util_test\&.t1 CREATE TABLE `t1` ( `a` char(30) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1; # TABLE: util_test\&.t2 CREATE TABLE `t2` ( `a` char(30) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; # TABLE: util_test\&.t3 CREATE TABLE `t3` ( `a` int(11) NOT NULL AUTO_INCREMENT, `b` char(30) DEFAULT NULL, PRIMARY KEY (`a`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; # TABLE: util_test\&.t4 CREATE TABLE `t4` ( `c` int(11) NOT NULL, `d` int(11) NOT NULL, KEY `ref_t3` (`c`), CONSTRAINT `ref_t3` FOREIGN KEY (`c`) REFERENCES `t3` (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; # VIEW: util_test\&.v1 [\&.\&.\&.] #\&.\&.\&.done\&. .fi .if n \{\ .RE .\} .PP Similarly, to export the data of the database util_test, producing bulk insert statements, use this command: .sp .if n \{\ .RS 4 .\} .nf $ mysqldbexport \-\-server=root:pass@localhost \e \-\-export=DATA \-\-bulk\-insert util_test # Source on localhost: \&.\&.\&. connected\&. USE util_test; # Exporting data from util_test # Data for table util_test\&.t1: INSERT INTO util_test\&.t1 VALUES (\*(Aq01 Test Basic database example\*(Aq), (\*(Aq02 Test Basic database example\*(Aq), (\*(Aq03 Test Basic database example\*(Aq), (\*(Aq04 Test Basic database example\*(Aq), (\*(Aq05 Test Basic database example\*(Aq), (\*(Aq06 Test Basic database example\*(Aq), (\*(Aq07 Test Basic database example\*(Aq); # Data for table util_test\&.t2: INSERT INTO util_test\&.t2 VALUES (\*(Aq11 Test Basic database example\*(Aq), (\*(Aq12 Test Basic database example\*(Aq), (\*(Aq13 Test Basic database example\*(Aq); # Data for table util_test\&.t3: INSERT INTO util_test\&.t3 VALUES (1, \*(Aq14 test fkeys\*(Aq), (2, \*(Aq15 test fkeys\*(Aq), (3, \*(Aq16 test fkeys\*(Aq); # Data for table util_test\&.t4: INSERT INTO util_test\&.t4 VALUES (3, 2); #\&.\&.\&.done\&. .fi .if n \{\ .RE .\} .PP If the database to be exported does not contain only InnoDB tables and you want to ensure data integrity of the exported data by locking the tables during the read step, add a \fB\-\-locking=lock\-all\fR option to the command: .sp .if n \{\ .RS 4 .\} .nf $ mysqldbexport \-\-server=root:pass@localhost \e \-\-export=DATA \-\-bulk\-insert util_test \-\-locking=lock\-all # Source on localhost: \&.\&.\&. connected\&. USE util_test; # Exporting data from util_test # Data for table util_test\&.t1: INSERT INTO util_test\&.t1 VALUES (\*(Aq01 Test Basic database example\*(Aq), (\*(Aq02 Test Basic database example\*(Aq), (\*(Aq03 Test Basic database example\*(Aq), (\*(Aq04 Test Basic database example\*(Aq), (\*(Aq05 Test Basic database example\*(Aq), (\*(Aq06 Test Basic database example\*(Aq), (\*(Aq07 Test Basic database example\*(Aq); # Data for table util_test\&.t2: INSERT INTO util_test\&.t2 VALUES (\*(Aq11 Test Basic database example\*(Aq), (\*(Aq12 Test Basic database example\*(Aq), (\*(Aq13 Test Basic database example\*(Aq); # Data for table util_test\&.t3: INSERT INTO util_test\&.t3 VALUES (1, \*(Aq14 test fkeys\*(Aq), (2, \*(Aq15 test fkeys\*(Aq), (3, \*(Aq16 test fkeys\*(Aq); # Data for table util_test\&.t4: INSERT INTO util_test\&.t4 VALUES (3, 2); #\&.\&.\&.done\&. .fi .if n \{\ .RE .\} .PP To export a database and include the replication commands to use the current server as the master (for example, to start a new slave using the current server as the master), use the following command: .sp .if n \{\ .RS 4 .\} .nf $ mysqldbexport \-\-server=root@localhost:3311 util_test \e \-\-export=both \-\-rpl\-user=rpl:rpl \-\-rpl=master \-v # Source on localhost: \&.\&.\&. connected\&. # # Stopping slave STOP SLAVE; # # Source on localhost: \&.\&.\&. connected\&. # Exporting metadata from util_test DROP DATABASE IF EXISTS util_test; CREATE DATABASE util_test; USE util_test; # TABLE: util_test\&.t1 CREATE TABLE `t1` ( `a` char(30) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1; #\&.\&.\&.done\&. # Source on localhost: \&.\&.\&. connected\&. USE util_test; # Exporting data from util_test # Data for table util_test\&.t1: INSERT INTO util_test\&.t1 VALUES (\*(Aq01 Test Basic database example\*(Aq); INSERT INTO util_test\&.t1 VALUES (\*(Aq02 Test Basic database example\*(Aq); INSERT INTO util_test\&.t1 VALUES (\*(Aq03 Test Basic database example\*(Aq); INSERT INTO util_test\&.t1 VALUES (\*(Aq04 Test Basic database example\*(Aq); INSERT INTO util_test\&.t1 VALUES (\*(Aq05 Test Basic database example\*(Aq); INSERT INTO util_test\&.t1 VALUES (\*(Aq06 Test Basic database example\*(Aq); INSERT INTO util_test\&.t1 VALUES (\*(Aq07 Test Basic database example\*(Aq); #\&.\&.\&.done\&. # # Connecting to the current server as master CHANGE MASTER TO MASTER_HOST = \*(Aqlocalhost\*(Aq, MASTER_USER = \*(Aqrpl\*(Aq, MASTER_PASSWORD = \*(Aqrpl\*(Aq, MASTER_PORT = 3311, MASTER_LOG_FILE = \*(Aqclone\-bin\&.000001\*(Aq , MASTER_LOG_POS = 106; # # Starting slave START SLAVE; # .fi .if n \{\ .RE .\} .PP Similarly, to export a database and include the replication commands to use the current server\*(Aqs master (for example, to start a new slave using the same the master), use the following command: .sp .if n \{\ .RS 4 .\} .nf $ mysqldbexport \-\-server=root@localhost:3311 util_test \e \-\-export=both \-\-rpl\-user=rpl:rpl \-\-rpl=slave \-v # Source on localhost: \&.\&.\&. connected\&. # # Stopping slave STOP SLAVE; # # Source on localhost: \&.\&.\&. connected\&. # Exporting metadata from util_test DROP DATABASE IF EXISTS util_test; CREATE DATABASE util_test; USE util_test; # TABLE: util_test\&.t1 CREATE TABLE `t1` ( `a` char(30) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1; #\&.\&.\&.done\&. # Source on localhost: \&.\&.\&. connected\&. USE util_test; # Exporting data from util_test # Data for table util_test\&.t1: INSERT INTO util_test\&.t1 VALUES (\*(Aq01 Test Basic database example\*(Aq); INSERT INTO util_test\&.t1 VALUES (\*(Aq02 Test Basic database example\*(Aq); INSERT INTO util_test\&.t1 VALUES (\*(Aq03 Test Basic database example\*(Aq); INSERT INTO util_test\&.t1 VALUES (\*(Aq04 Test Basic database example\*(Aq); INSERT INTO util_test\&.t1 VALUES (\*(Aq05 Test Basic database example\*(Aq); INSERT INTO util_test\&.t1 VALUES (\*(Aq06 Test Basic database example\*(Aq); INSERT INTO util_test\&.t1 VALUES (\*(Aq07 Test Basic database example\*(Aq); #\&.\&.\&.done\&. # # Connecting to the current server\*(Aqs master CHANGE MASTER TO MASTER_HOST = \*(Aqlocalhost\*(Aq, MASTER_USER = \*(Aqrpl\*(Aq, MASTER_PASSWORD = \*(Aqrpl\*(Aq, MASTER_PORT = 3310, MASTER_LOG_FILE = \*(Aqclone\-bin\&.000001\*(Aq , MASTER_LOG_POS = 1739; # # Starting slave START SLAVE; # .fi .if n \{\ .RE .\} .SH "COPYRIGHT" .br .SH "SEE ALSO" For more information, please refer to the MySQL Utilities section of the MySQL Workbench Reference Manual, which is available online at http://dev.mysql.com/doc/workbench/en/. .SH AUTHOR Oracle Corporation (http://dev.mysql.com/). mysql-utilities-1.6.1/docs/man/mysqldbimport.10000644001577100000120000003244012473641047020651 0ustar pb2userwheel'\" t .\" Title: \fBmysqldbimport\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 10/03/2013 .\" Manual: MySQL Utilities .\" Source: MySQL 1.4.0 .\" Language: English .\" .TH "\FBMYSQLDBIMPORT\FR" "1" "10/03/2013" "MySQL 1\&.4\&.0" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .\" mysqldbimport .\" utilities: mysqldbimport .\" scripts .SH "NAME" mysqldbimport \- Import Object Definitions or Data into a Databases .SH "SYNOPSIS" .HP \w'\fBmysqldbimport\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIimport_file\fR\fR\fB\ \&.\&.\&.\fR\ 'u \fBmysqldbimport [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIimport_file\fR\fR\fB \&.\&.\&.\fR .SH "DESCRIPTION" .PP This utility imports metadata (object definitions) or data or both for one or more databases from one or more files\&. .PP If an object exists on the destination server with the same name as an imported object, it is dropped first before importing the new object\&. .PP To skip objects by type, use the \fB\-\-skip\fR option with a list of the objects to skip\&. This enables you to extract a particular set of objects, say, for importing only events (by excluding all other types)\&. Similarly, to skip creation of \fBUPDATE\fR statements for BLOB data, specify the \fB\-\-skip\-blobs\fR option\&. .PP To specify the input format, use one of the following values with the \fB\-\-format\fR option\&. These correspond to the output formats of the \fBmysqldbexport\fR utility: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBsql\fR (default) .sp Input consists of SQL statements\&. For definitions, this consists of the appropriate \fBCREATE\fR and \fBGRANT\fR statements\&. For data, this is an \fBINSERT\fR statement (or bulk insert if the \fB\-\-bulk\-insert\fR option is specified)\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBgrid\fR .sp Display output in grid or table format like that of the \fBmysql\fR monitor\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBcsv\fR .sp Input is formatted in comma\-separated values format\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBraw_csv\fR .sp Input is a simple CSV file containing uniform rows with values separated with commas\&. The file can contain a header (the first row) that lists the table columns\&. The option \fB\-\-table\fR is required to use this format\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBtab\fR .sp Input is formatted in tab\-separated format\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fBvertical\fR .sp Display output in single\-column format like that of the \eG command for the \fBmysql\fR monitor\&. .RE .PP To indicate that input in \fBcsv\fR or \fBtab\fR format does not contain column headers, specify the \fB\-\-no\-headers\fR option\&. .PP To turn off all feedback information, specify the \fB\-\-quiet\fR option\&. .PP By default, the utility creates each table on the destination server using the same storage engine as the original table\&. To override this and specify the storage engine to use for all tables created on the destination server, use the \fB\-\-new\-storage\-engine\fR option\&. If the destination server supports the new engine, all tables use that engine\&. .PP To specify the storage engine to use for tables for which the destination server does not support the original storage engine on the source server, use the \fB\-\-default\-storage\-engine\fR option\&. .PP The \fB\-\-new\-storage\-engine\fR option takes precedence over \fB\-\-default\-storage\-engine\fR if both are given\&. .PP If the \fB\-\-new\-storage\-engine\fR or \fB\-\-default\-storage\-engine\fR option is given and the destination server does not support the specified storage engine, a warning is issued and the server\*(Aqs default storage engine setting is used instead\&. .PP You must provide connection parameters (user, host, password, and so forth) for an account that has the appropriate privileges to access all objects in the operation\&. For details, see NOTES\&. .PP If you attempt to import databases on a server with GTIDs enabled (GTID_MODE = ON), a warning will be generated if the import file did not include the GTID statements generated by mysqldbexport\&. .PP The utility will also generate a warning if you import databases on a server without GTIDs enabled and there are GTID statements present in the file\&. Use the \fB\-\-skip\-gtid\fR option to ignore the GTID statements\&. .PP To make the most use of GTIDs and export/import, you should export all of the databases on the server with the \fB \-\-all\fR option\&. This will generate an export file with all of the databases and the GTIDs executed to that point\&. Importing this file on another server will ensure that server has all of the data as well as all of the GTIDs recorded correctly in its logs\&. OPTIONS .PP \fBmysqldbimport\fR accepts the following command\-line options: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-help .sp Display a help message and exit\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-bulk\-insert, \-b .sp Use bulk insert statements for data\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-default\-storage\-engine= .sp The engine to use for tables if the destination server does not support the original storage engine on the source server\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-drop\-first, \-d .sp Drop each database to be imported if exists before importing anything into it\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-dryrun .sp Import the files and generate the statements but do not execute them\&. This is useful for testing input file validity\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-format=, \-f .sp Specify the input format\&. Permitted format values are \fBsql\fR, \fBgrid\fR, \fBtab\fR, \fBcsv\fR, \fBraw_csv\fR, and \fBvertical\fR\&. The default is \fBsql\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-import=, \-i .sp Specify the import format\&. Permitted format values are \fBdefinitions\fR = import only the definitions (metadata) for the objects in the database list, \fBdata\fR = import only the table data for the tables in the database list, and \fBboth\fR = import the definitions and the data\&. The default is \fBdefinitions\fR\&. .sp If you attempt to import objects into an existing database, the result depends on the import format\&. If the format is \fBdefinitions\fR or \fBboth\fR, an error occurs unless \fB\-\-drop\-first\fR is given\&. If the format is \fBdata\fR, imported table data is added to existing table data\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-new\-storage\-engine= .sp The engine to use for all tables created on the destination server\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-no\-headers, \-h .sp Input does not contain column headers\&. This option applies only for \fBcsv\fR and \fBtab\fR output\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-quiet, \-q .sp Turn off all messages for quiet execution\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-server= .sp Connection information for the server in the format: <\fIuser\fR>[:<\fIpasswd\fR>]@<\fIhost\fR>[:<\fIport\fR>][:<\fIsocket\fR>] or <\fIlogin\-path\fR>[:<\fIport\fR>][:<\fIsocket\fR>]\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-skip= .sp Specify objects to skip in the operation as a comma\-separated list (no spaces)\&. Permitted values are \fBCREATE_DB\fR, \fBDATA\fR, \fBEVENTS\fR, \fBFUNCTIONS\fR, \fBGRANTS\fR, \fBPROCEDURES\fR, \fBTABLES\fR, \fBTRIGGERS\fR, and \fBVIEWS\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-skip\-blobs .sp Do not import BLOB data\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-skip\-gtid .sp Skip execution of GTID_PURGED statements\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-skip\-rpl .sp Do not execute replication commands\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-table=, .sp Specify the table for importing\&. This option is required while using \fB\-\-format=raw_csv\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-verbose, \-v .sp Specify how much information to display\&. Use this option multiple times to increase the amount of information\&. For example, \fB\-v\fR = verbose, \fB\-vv\fR = more verbose, \fB\-vvv\fR = debug\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-version .sp Display version information and exit\&. .RE NOTES .PP The login user must have the appropriate permissions to create new objects, access (read) the mysql database, and grant privileges\&. If a database to be imported already exists, the user must have read permission for it, which is needed to check the existence of objects in the database\&. .PP Actual privileges needed may differ from installation to installation depending on the security privileges present and whether the database contains certain objects such as views or events and whether binary logging is enabled\&. .PP Some combinations of the options may result in errors during the operation\&. For example, excluding tables but not views may result in an error when a view is imported\&. .PP The \fB\-\-new\-storage\-engine\fR and \fB\-\-default\-storage\-engine\fR options apply to all destination tables in the operation\&. .PP For the \fB\-\-format\fR and \fB\-\-import\fR options, the permitted values are not case sensitive\&. In addition, values may be specified as any unambiguous prefix of a valid value\&. For example, \fB\-\-format=g\fR specifies the grid format\&. An error occurs if a prefix matches more than one valid value\&. .PP When importing data and including the GTID commands, you may encounter an error similar to "GTID_PURGED can only be set when GTID_EXECUTED is empty"\&. This occurs because the destination server is not in a clean replication state\&. To aleviate this problem, you can issue a "RESET MASTER" command on the destination prior to executing the import\&. .PP The path to the MySQL client tools should be included in the PATH environment variable in order to use the authentication mechanism with login\-paths\&. This will allow the utility to use the my_print_defaults tools which is required to read the login\-path values from the login configuration file (\&.mylogin\&.cnf)\&. EXAMPLES .PP To import the metadata from the util_test database to the server on the local host using a file in CSV format, use this command: .sp .if n \{\ .RS 4 .\} .nf $ mysqldbimport \-\-server=root@localhost \-\-import=definitions \e \-\-format=csv data\&.csv # Source on localhost: \&.\&.\&. connected\&. # Importing definitions from data\&.csv\&. #\&.\&.\&.done\&. .fi .if n \{\ .RE .\} .PP Similarly, to import the data from the util_test database to the server on the local host, importing the data using bulk insert statements, use this command: .sp .if n \{\ .RS 4 .\} .nf $ mysqldbimport \-\-server=root@localhost \-\-import=data \e \-\-bulk\-insert \-\-format=csv data\&.csv # Source on localhost: \&.\&.\&. connected\&. # Importing data from data\&.csv\&. #\&.\&.\&.done\&. .fi .if n \{\ .RE .\} .PP To import both data and definitions from the util_test database, importing the data using bulk insert statements from a file that contains SQL statements, use this command: .sp .if n \{\ .RS 4 .\} .nf $ mysqldbimport \-\-server=root@localhost \-\-import=both \-\-bulk\-insert \-\-format=sql data\&.sql # Source on localhost: \&.\&.\&. connected\&. # Importing definitions and data from data\&.sql\&. #\&.\&.\&.done\&. .fi .if n \{\ .RE .\} .SH "COPYRIGHT" .br .SH "SEE ALSO" For more information, please refer to the MySQL Utilities section of the MySQL Workbench Reference Manual, which is available online at http://dev.mysql.com/doc/workbench/en/. .SH AUTHOR Oracle Corporation (http://dev.mysql.com/). mysql-utilities-1.6.1/docs/man/mysqlauditgrep.10000644001577100000120000010602412473641047021015 0ustar pb2userwheel'\" t .\" Title: \fBmysqlauditgrep\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 10/03/2013 .\" Manual: MySQL Utilities .\" Source: MySQL 1.4.0 .\" Language: English .\" .TH "\FBMYSQLAUDITGREP\FR" "1" "10/03/2013" "MySQL 1\&.4\&.0" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .\" mysqlauditgrep .\" utilities: mysqlauditgrep .\" scripts .SH "NAME" mysqlauditgrep \- Search an audit log .SH "SYNOPSIS" .HP \w'\fB\ mysqlauditgrep\ [\fR\fB\fIOPTIONS\fR\fR\fB]\&.\&.\&.\ \fR\fB\fIAUDIT_LOG_FILE\fR\fR\fB\ \fR\fB\ mysqlauditgrep\ \-\-file\-stats[\-\-format=\fR\fB\fIFORMAT\fR\fR\fB]\ \fR\fB\fIAUDIT_LOG_FILE\fR\fR\fB\ \fR\fB\ mysqlauditgrep\ \-\-format=\fR\fB\fIFORMAT\fR\fR\fB\ \fR\fB\fIAUDIT_LOG_FILE\fR\fR\fB\ \fR\fB\ mysqlauditgrep\ [\-\-users=\fR\fB\fIUSERS\fR\fR\fB]\ [\-\-start\-date=\fR\fB\fISTART_DATE\fR\fR\fB]\ [\-\-end\-date=\fR\fB\fIEND_DATE\fR\fR\fB]\ [\-\-pattern=\fR\fB\fIPATTERN\fR\fR\fB[\-\-regexp]]\ [\-\-query\-type=\fR\fB\fIQUERY_TYPE\fR\fR\fB]\ [\-\-event\-type=\fR\fB\fIEVENT_TYPE\fR\fR\fB]\ [\-\-status=\fR\fB\fISTATUS\fR\fR\fB]\ [\-\-format=\fR\fB\fIFORMAT\fR\fR\fB]\ \fR\fB\fIAUDIT_LOG_FILE\fR\fR\fB\ \fR\ 'u \fB mysqlauditgrep [\fR\fB\fIOPTIONS\fR\fR\fB]\&.\&.\&. \fR\fB\fIAUDIT_LOG_FILE\fR\fR\fB \fR\fB mysqlauditgrep \-\-file\-stats[\-\-format=\fR\fB\fIFORMAT\fR\fR\fB] \fR\fB\fIAUDIT_LOG_FILE\fR\fR\fB \fR\fB mysqlauditgrep \-\-format=\fR\fB\fIFORMAT\fR\fR\fB \fR\fB\fIAUDIT_LOG_FILE\fR\fR\fB \fR\fB mysqlauditgrep [\-\-users=\fR\fB\fIUSERS\fR\fR\fB] [\-\-start\-date=\fR\fB\fISTART_DATE\fR\fR\fB] [\-\-end\-date=\fR\fB\fIEND_DATE\fR\fR\fB] [\-\-pattern=\fR\fB\fIPATTERN\fR\fR\fB[\-\-regexp]] [\-\-query\-type=\fR\fB\fIQUERY_TYPE\fR\fR\fB] [\-\-event\-type=\fR\fB\fIEVENT_TYPE\fR\fR\fB] [\-\-status=\fR\fB\fISTATUS\fR\fR\fB] [\-\-format=\fR\fB\fIFORMAT\fR\fR\fB] \fR\fB\fIAUDIT_LOG_FILE\fR\fR\fB \fR .SH "DESCRIPTION" .PP This utility allows you to search the current or archived audit logs, allowing you to display data from the audit log file according to the defined search criterion\&. It also allows you to output the results in different formats, namely GRID (default), TAB, CSV, VERTICAL, and RAW (the original XML format)\&. .PP This utility allows you to search and filter the returned audit log records by: users (\fB\-\-users\fR), date and time ranges (\fB\-\-start\-date\fR and \fB\-\-end\-date\fR), SQL query types (\fB\-\-query\-type\fR), logged event and record types (\fB\-\-event\-type\fR), status (\fB\-\-status\fR), and matching patterns (\fB\-\-pattern\fR)\&. Any of these search options can be combined and used together, with the retrieved records resulting from all passed in options being true\&. .PP The \fB\-\-pattern\fR supports two types of pattern matching: standard SQL, used with the SQL \fILIKE\fR operator (SQL patterns), and standard \fIREGEXP\fR (POSIX regular expression patterns)\&. .PP This utility always requires an audit log file to be passed in, so the \fIAUDIT_LOG_FILE\fR argument is searched as a full path and file name for the audit log file\&. If not specified, a notification concerning this requirement will be printed\&. And if \fB\-\-format\fR is passed in without search parameters, then all the records of the audit log are displayed in the specified format\&. .PP The \fB\-\-file\-stats\fR option is not considered a search criteria, and is used to display the file statistics of a specified audit log\&. Other search options will be ignored when the \fB\-\-file\-stats\fR option is used, except the \fB\-\-format\fR option will continue to format the results accordingly\&. .PP To specify the format of the generated results, use one of the following values with the \fB\-\-format\fR option: .sp .RS 4 .ie n \{\ \h'-04' 1.\h'+01'\c .\} .el \{\ .sp -1 .IP " 1." 4.2 .\} \fIGRID (default)\fR .sp Display output in grid or table format like that of the \fBmysql\fR monitor\&. .RE .sp .RS 4 .ie n \{\ \h'-04' 2.\h'+01'\c .\} .el \{\ .sp -1 .IP " 2." 4.2 .\} \fICSV\fR .sp Display output in comma\-separated values format\&. .RE .sp .RS 4 .ie n \{\ \h'-04' 3.\h'+01'\c .\} .el \{\ .sp -1 .IP " 3." 4.2 .\} \fIVERTICAL\fR .sp Display output in single\-column format like that of the \eG command for the \fBmysql\fR monitor\&. .RE .sp .RS 4 .ie n \{\ \h'-04' 4.\h'+01'\c .\} .el \{\ .sp -1 .IP " 4." 4.2 .\} \fIRAW\fR .sp Display output results in the original raw format of the audit log records, which is written in XML\&. .RE Standard SQL Pattern Matching .PP The simple patterns defined by the SQL standard enables users to use two characters with special meanings: \(lq%\(rq (percent) matches zero or more characters, and \(lq_\(rq (underscore) matches exactly one arbitrary character\&. In standard SQL, these types of patterns are used with the LIKE comparison operator, and they are case\-insensitive by default\&. This utility assumes that they are case\-insensitive\&. .PP For example: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} "audit%" .sp Match any string that starts with "audit"\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} "%log%" .sp Match any string containing the word "log"\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} "%_" .sp Match any string consisting of one or more characters\&. .RE .PP For documentation about the standard SQL pattern matching syntax, see \m[blue]\fBPattern Matching\fR\m[]\&\s-2\u[1]\d\s+2\&. REGEXP Pattern Matching (POSIX) .PP Standard \fIREGEXP\fR patterns are more powerful than the simple patterns defined in the SQL standard\&. A regular expression is a string of ordinary and special characters specified to match other strings\&. Unlike SQL Patterns, \fIREGEXP\fR patterns are case\-sensitive\&. The \fIREGEXP\fR syntax defines the following characters with special meaning: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fI\&.\fR .sp Match any character\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fI^\fR .sp Match the beginning of a string\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fI$\fR .sp Match the end of a string\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fI\e\fR .sp Match zero or more repetitions of the preceding regular expression\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fI+\fR .sp Match one or more repetitions of the preceding regular expression\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fI?\fR .sp Match zero or one repetition of the preceding regular expression\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fI|\fR .sp Match either the regular expressions from the left or right of |\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fI[]\fR .sp Indicates a set of characters to match\&. Note that, special characters lose their special meaning inside sets\&. In particular, ^ acquires a different meaning if it is the first character of the set, matching the complementary set (i\&.e\&., all the characters that are not in the set will be matched)\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fI{m}\fR .sp Match \fIm\fR repetitions of the preceding regular expression\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fI{m,n}\fR .sp Match from \fIm\fR to \fIn\fR repetitions of the preceding regular expression\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fI()\fR .sp Define a matching group, and matches the regular expression inside the parentheses\&. .RE .PP For example: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fI"a\e*"\fR .sp Match a sequence of zero or more a\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fI"a+"\fR .sp Match a sequence of one or more a\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fI"a?"\fR .sp Match zero or one a\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fI"ab|cd"\fR .sp Match ab or cd\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fI"[axy]"\fR .sp Match a, x or y\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fI"[a\-f]"\fR .sp Match any character in the range a to f (that is, a, b, c, d, e, or f)\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fI"[^axy]"\fR .sp Match any character \fIexcept\fRa, x or y\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fI"a{5}"\fR .sp Match exactly five copies of a\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fI"a{2,5}"\fR .sp Match from two to five copies of a\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fI"(abc)+"\fR .sp Match one or more repetitions of abc\&. .RE .PP This is a brief overview of regular expressions that can be used to define this type of patterns\&. The full syntax is described in the \m[blue]\fBPython "re" module docs\fR\m[]\&\s-2\u[2]\d\s+2, supporting the definition of much more complex pattern matching expression\&. OPTIONS .PP \fBmysqlauditgrep\fR accepts the following command\-line options: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-end\-date= .sp End date/time to retrieve log entries until the specified date/time range\&. If not specified or the value is 0, all entries to the end of the log are displayed\&. Accepted formats: "yyyy\-mm\-ddThh:mm:ss" or "yyyy\-mm\-dd"\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-event\-type= .sp Comma\-separated list of event types to search in all audit log records matching the specified types\&. Supported values are: Audit, Binlog Dump, Change user, Close stmt, Connect Out, Connect, Create DB, Daemon, Debug, Delayed insert, Drop DB, Execute, Fetch, Field List, Init DB, Kill, Long Data, NoAudit, Ping, Prepare, Processlist, Query, Quit, Refresh, Register Slave, Reset stmt, Set option, Shutdown, Sleep, Statistics, Table Dump, Time\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-file\-stats .sp Display the audit log file statistics\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-format=FORMAT, \-f FORMAT .sp Output format to display the resulting data\&. Supported format values: GRID (default), TAB, CSV, VERTICAL and RAW\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-help .sp Display a help message and exit\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-pattern=, \-e .sp Search pattern to retrieve all entries with at least one attribute value matching the specified pattern\&. By default the standard SQL \fILIKE\fR patterns are used for matching\&. If the \fB\-\-regexp\fR option is set, then \fIREGEXP\fR patterns must be specified for matching\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-query\-type= .sp Comma\-separated list of SQL statements/commands to search for and match\&. Supported values: CREATE, ALTER, DROP, TRUNCATE, RENAME, GRANT, REVOKE, SELECT, INSERT, UPDATE, DELETE, COMMIT, SHOW, SET, CALL, PREPARE, EXECUTE, DEALLOCATE\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-regexp, \-\-basic\-regexp, \-G .sp Indicates that pattern matching will be performed using a regular expression \fIREGEXP\fR (from the Python re module)\&. By default, the simple standard SQL \fILIKE\fR patterns are used for matching\&. This affects how the value specified by the \fB\-\-pattern\fR option is interpreted\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-start\-date= .sp Starting date/time to retrieve log entries from the specified date/time range\&. If not specified or the value is 0, all entries from the start of the log are displayed\&. Accepted formats: yyyy\-mm\-ddThh:mm:ss or yyyy\-mm\-dd\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-status= .sp Comma\-separated list of status values or intervals to search for all audit log records with a matching status\&. Status values are non\-negative integers (corresponding to MySQL error codes)\&. Status intervals are closed (i\&.e\&., include both endpoints) and defined simply using a dash between its endpoints\&. For Example: 1051,1068\-1075,1109,1146\&. .sp The \-\-status option is available as of MySQL Utilities 1\&.2\&.4 / 1\&.3\&.3\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-users=, \-u .sp Comma\-separated list of user names, to search for their associated log entries\&. For example: "dan,jon,john,paul,philip,stefan"\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-verbose, \-v .sp Specify how much information to display\&. Use this option multiple times to increase the amount of information\&. For example, \fB\-v\fR = verbose, \fB\-vv\fR = more verbose, \fB\-vvv\fR = debug\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-version .sp Display version information and exit\&. .RE NOTES .PP This utility is available as of μ 1\&.2\&.0\&. .PP This utility can only be applied to servers with the \m[blue]\fBaudit log plugin enabled\fR\m[]\&\s-2\u[3]\d\s+2\&. And the audit log plugin is available as of MySQL Server versions 5\&.5\&.28 and 5\&.6\&.10\&. .PP This utility requires the use of Python version 2\&.6 or higher, but does not support Python 3\&. .PP Single or double quote characters (respectively, \fI\*(Aq\fR or \fI"\fR) can be used around option values\&. In fact, quotes are required to set some options values correctly, such as values with whitespace\&. For example, to specify the event types \fBCreate DB\fR and \fBDrop DB\fR for the \fB\-\-event\-type\fR option, the following syntax must be used: \fB\-\-event\-type=\*(AqCreate DB,Drop DB\*(Aq\fR or \fB\-\-event\-type="Create DB,Drop DB"\fR\&. EXAMPLES .PP To display the audit log file statistics and output the results in CSV format, run the following command: .sp .if n \{\ .RS 4 .\} .nf shell> mysqlauditgrep \-\-file\-stats \-\-format=CSV /SERVER/data/audit\&.log # # Audit Log File Statistics: # File,Size,Created,Last Modified audit\&.log,9101,Thu Sep 27 13:33:11 2012,Thu Oct 11 17:40:35 2012 # # Audit Log Startup Entries: # SERVER_ID,STARTUP_OPTIONS,NAME,TIMESTAMP,MYSQL_VERSION,OS_VERSION,VERSION 1,/SERVER/sql/mysqld \-\-defaults\-file=/SERVER/my\&.cnf,Audit,2012\-09\-27T13:33:11,5\&.5\&.29\-log,x86_64\-Linux,1 .fi .if n \{\ .RE .\} .PP To display the audit log entries of specific users, use the following command: .sp .if n \{\ .RS 4 .\} .nf shell> mysqlauditgrep \-\-users=tester1,tester2 /SERVER/data/audit\&.log .fi .if n \{\ .RE .\} .PP To display the audit log file statistics, run the following command: .sp .if n \{\ .RS 4 .\} .nf shell> mysqlauditgrep \-\-users=tester1,tester2 /SERVER/data/audit\&.log +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | STATUS | SERVER_ID | NAME | TIMESTAMP | CONNECTION_ID | HOST | USER | PRIV_USER | IP | SQLTEXT | +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | 0 | 1 | Connect | 2012\-09\-28T11:26:50 | 9 | localhost | root | tester1 | 127\&.0\&.0\&.1 | None | | 0 | 1 | Query | 2012\-09\-28T11:26:50 | 9 | None | root | tester1 | None | SET @@session\&.autocommit = OFF | | 0 | 1 | Ping | 2012\-09\-28T11:26:50 | 9 | None | root | tester1 | None | None | | 0 | 1 | Query | 2012\-09\-28T11:26:50 | 9 | None | root | tester1 | None | SHOW VARIABLES LIKE \*(AqREAD_ONLY\*(Aq | | 0 | 1 | Query | 2012\-09\-28T11:26:50 | 9 | None | root | tester1 | None | COMMIT | | 0 | 1 | Ping | 2012\-09\-28T11:26:50 | 9 | None | root | tester1 | None | None | | 0 | 1 | Query | 2012\-09\-28T11:26:50 | 9 | None | root | tester1 | None | COMMIT | | 0 | 1 | Quit | 2012\-09\-28T11:26:50 | 9 | None | root | tester1 | None | None | | 0 | 1 | Connect | 2012\-10\-10T15:55:55 | 11 | localhost | tester2 | root | 127\&.0\&.0\&.1 | None | | 0 | 1 | Query | 2012\-10\-10T15:55:55 | 11 | None | tester2 | root | None | select @@version_comment limit 1 | | 0 | 1 | Query | 2012\-10\-10T15:56:10 | 11 | None | tester2 | root | None | show databases | | 1046 | 1 | Query | 2012\-10\-10T15:57:26 | 11 | None | tester2 | root | None | show tables test | | 1046 | 1 | Query | 2012\-10\-10T15:57:36 | 11 | None | tester2 | root | None | show tables test | | 0 | 1 | Query | 2012\-10\-10T15:57:51 | 11 | None | tester2 | root | None | show tables in test | | 0 | 1 | Quit | 2012\-10\-10T15:57:59 | 11 | None | tester2 | root | None | None | | 0 | 1 | Connect | 2012\-10\-10T17:35:42 | 12 | localhost | tester2 | root | 127\&.0\&.0\&.1 | None | | 0 | 1 | Query | 2012\-10\-10T17:35:42 | 12 | None | tester2 | root | None | select @@version_comment limit 1 | | 0 | 1 | Quit | 2012\-10\-10T17:47:22 | 12 | None | tester2 | root | None | None | +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ .fi .if n \{\ .RE .\} .PP To display the audit log entries for a specific date/time range, use the following command: .sp .if n \{\ .RS 4 .\} .nf shell> mysqlauditgrep \-\-start\-date=2012\-09\-27T13:33:47 \-\-end\-date=2012\-09\-28 /SERVER/data/audit\&.log +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | STATUS | TIMESTAMP | NAME | CONNECTION_ID | SQLTEXT | +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | 0 | 2012\-09\-27T13:33:47 | Ping | 7 | None | | 0 | 2012\-09\-27T13:33:47 | Query | 7 | SELECT * FROM INFORMATION_SCHEMA\&.PLUGINS WHERE PLUGIN_NAME LIKE \*(Aqaudit%\*(Aq | | 0 | 2012\-09\-27T13:33:47 | Query | 7 | COMMIT | | 0 | 2012\-09\-27T13:34:48 | Quit | 7 | None | | 0 | 2012\-09\-27T13:34:48 | Quit | 8 | None | +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ .fi .if n \{\ .RE .\} .PP To display the audit log entries matching a specific SQL \fILIKE\fR pattern, use the following command: .sp .if n \{\ .RS 4 .\} .nf shell> mysqlauditgrep \-\-pattern="% = ___"; /SERVER/data/audit\&.log +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | STATUS | TIMESTAMP | NAME | SQLTEXT | CONNECTION_ID | +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | 0 | 2012\-09\-27T13:33:39 | Query | SET @@session\&.autocommit = OFF | 7 | | 0 | 2012\-09\-27T13:33:39 | Query | SET @@session\&.autocommit = OFF | 8 | | 0 | 2012\-09\-28T11:26:50 | Query | SET @@session\&.autocommit = OFF | 9 | | 0 | 2012\-09\-28T11:26:50 | Query | SET @@session\&.autocommit = OFF | 10 | +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ .fi .if n \{\ .RE .\} .PP To display the audit log entries matching a specific \fIREGEXP \fR pattern, use the following command: .sp .if n \{\ .RS 4 .\} .nf shell> mysqlauditgrep \-\-pattern="\&.* = \&.\&.\&." \-\-regexp /SERVER/data/audit\&.log +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | STATUS | TIMESTAMP | NAME | SQLTEXT | CONNECTION_ID | +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | 0 | 2012\-09\-27T13:33:39 | Query | SET @@session\&.autocommit = OFF | 7 | | 0 | 2012\-09\-27T13:33:39 | Query | SET @@session\&.autocommit = OFF | 8 | | 0 | 2012\-09\-28T11:26:50 | Query | SET @@session\&.autocommit = OFF | 9 | | 0 | 2012\-09\-28T11:26:50 | Query | SET @@session\&.autocommit = OFF | 10 | +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ .fi .if n \{\ .RE .\} .PP To display the audit log entries of specific query types, use the following command: .sp .if n \{\ .RS 4 .\} .nf shell> mysqlauditgrep \-\-query\-type=show,SET /SERVER/data/audit\&.log +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | STATUS | TIMESTAMP | NAME | SQLTEXT | CONNECTION_ID | +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | 0 | 2012\-09\-27T13:33:39 | Query | SET NAMES \*(Aqlatin1\*(Aq COLLATE \*(Aqlatin1_swedish_ci\*(Aq | 7 | | 0 | 2012\-09\-27T13:33:39 | Query | SET @@session\&.autocommit = OFF | 7 | | 0 | 2012\-09\-27T13:33:39 | Query | SHOW VARIABLES LIKE \*(AqREAD_ONLY\*(Aq | 7 | | 0 | 2012\-09\-27T13:33:39 | Query | SHOW VARIABLES LIKE \*(Aqdatadir\*(Aq | 7 | | 0 | 2012\-09\-27T13:33:39 | Query | SHOW VARIABLES LIKE \*(Aqbasedir\*(Aq | 7 | | 0 | 2012\-09\-27T13:33:39 | Query | SET NAMES \*(Aqlatin1\*(Aq COLLATE \*(Aqlatin1_swedish_ci\*(Aq | 8 | | 0 | 2012\-09\-27T13:33:39 | Query | SET @@session\&.autocommit = OFF | 8 | | 0 | 2012\-09\-27T13:33:39 | Query | SHOW VARIABLES LIKE \*(AqREAD_ONLY\*(Aq | 8 | | 0 | 2012\-09\-27T13:33:39 | Query | SHOW VARIABLES LIKE \*(Aqbasedir\*(Aq | 8 | | 0 | 2012\-09\-28T11:26:50 | Query | SET NAMES \*(Aqlatin1\*(Aq COLLATE \*(Aqlatin1_swedish_ci\*(Aq | 9 | | 0 | 2012\-09\-28T11:26:50 | Query | SET @@session\&.autocommit = OFF | 9 | | 0 | 2012\-09\-28T11:26:50 | Query | SHOW VARIABLES LIKE \*(AqREAD_ONLY\*(Aq | 9 | | 0 | 2012\-09\-28T11:26:50 | Query | SET NAMES \*(Aqlatin1\*(Aq COLLATE \*(Aqlatin1_swedish_ci\*(Aq | 10 | | 0 | 2012\-09\-28T11:26:50 | Query | SET @@session\&.autocommit = OFF | 10 | | 0 | 2012\-09\-28T11:26:50 | Query | SHOW VARIABLES LIKE \*(AqREAD_ONLY\*(Aq | 10 | | 0 | 2012\-09\-28T11:26:50 | Query | SET @@GLOBAL\&.audit_log_flush = ON | 10 | | 0 | 2012\-09\-28T11:26:50 | Query | SHOW VARIABLES LIKE \*(Aqaudit_log_policy\*(Aq | 10 | | 0 | 2012\-09\-28T11:26:50 | Query | SHOW VARIABLES LIKE \*(Aqaudit_log_rotate_on_size\*(Aq | 10 | | 0 | 2012\-10\-10T15:56:10 | Query | show databases | 11 | | 1046 | 2012\-10\-10T15:57:26 | Query | show tables test | 11 | | 1046 | 2012\-10\-10T15:57:36 | Query | show tables test | 11 | | 0 | 2012\-10\-10T15:57:51 | Query | show tables in test | 11 | +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ .fi .if n \{\ .RE .\} .PP To display the audit log entries of specific event types, use the following command: .sp .if n \{\ .RS 4 .\} .nf shell> mysqlauditgrep \-\-event\-type="Ping,Connect" /SERVER/data/audit\&.log +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+ | STATUS | NAME | TIMESTAMP | CONNECTION_ID | HOST | USER | PRIV_USER | IP | +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+ | 0 | Connect | 2012\-09\-27T13:33:39 | 7 | localhost | root | root | 127\&.0\&.0\&.1 | | 0 | Ping | 2012\-09\-27T13:33:39 | 7 | None | None | None | None | | 0 | Ping | 2012\-09\-27T13:33:39 | 7 | None | None | None | None | | 0 | Ping | 2012\-09\-27T13:33:39 | 7 | None | None | None | None | | 0 | Ping | 2012\-09\-27T13:33:39 | 7 | None | None | None | None | | 0 | Connect | 2012\-09\-27T13:33:39 | 8 | localhost | root | root | 127\&.0\&.0\&.1 | | 0 | Ping | 2012\-09\-27T13:33:39 | 8 | None | None | None | None | | 0 | Ping | 2012\-09\-27T13:33:39 | 8 | None | None | None | None | | 0 | Ping | 2012\-09\-27T13:33:47 | 7 | None | None | None | None | | 0 | Connect | 2012\-09\-28T11:26:50 | 9 | localhost | root | tester | 127\&.0\&.0\&.1 | | 0 | Ping | 2012\-09\-28T11:26:50 | 9 | None | None | None | None | | 0 | Ping | 2012\-09\-28T11:26:50 | 9 | None | None | None | None | | 0 | Connect | 2012\-09\-28T11:26:50 | 10 | localhost | root | root | 127\&.0\&.0\&.1 | | 0 | Ping | 2012\-09\-28T11:26:50 | 10 | None | None | None | None | | 0 | Ping | 2012\-09\-28T11:26:50 | 10 | None | None | None | None | | 0 | Ping | 2012\-09\-28T11:26:50 | 10 | None | None | None | None | | 0 | Ping | 2012\-09\-28T11:26:50 | 10 | None | None | None | None | | 0 | Ping | 2012\-09\-28T11:26:50 | 10 | None | None | None | None | | 0 | Connect | 2012\-10\-10T15:55:55 | 11 | localhost | tester | root | 127\&.0\&.0\&.1 | | 0 | Connect | 2012\-10\-10T17:35:42 | 12 | localhost | tester | root | 127\&.0\&.0\&.1 | +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+ .fi .if n \{\ .RE .\} .PP To display the audit log entries with a specific status, use the following command: .sp .if n \{\ .RS 4 .\} .nf shell> mysqlauditgrep \-\-status=1100\-1199,1046 /SERVER/data/audit\&.log +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | STATUS | TIMESTAMP | NAME | SQLTEXT | CONNECTION_ID | +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | 1046 | 2012\-10\-10T15:57:26 | Query | show tables test | 11 | | 1046 | 2012\-10\-10T15:57:36 | Query | show tables test | 11 | | 1146 | 2012\-10\-10T17:44:55 | Query | select * from teste\&.employees where salary > 500 and salary < 1000 | 12 | | 1046 | 2012\-10\-10T17:47:17 | Query | select * from test_encoding where value = \*(Aq<>"&\*(Aq | 12 | +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ .fi .if n \{\ .RE .\} .PP Note: You can view all successful commands with \fB\-\-status=0\fR and all unsuccessful ones with \fB\-\-status=1\-9999\fR\&. .PP To display the audit log entries matching several search criteria, use the following command: .sp .if n \{\ .RS 4 .\} .nf shell> mysqlauditgrep \-\-users=root \-\-start\-date=0 \-\-end\-date=2012\-10\-10 \-\-event\-type=Query \e \-\-query\-type=SET \-\-status=0 \-\-pattern="%audit_log%" /SERVER/data/audit\&.log +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | STATUS | SERVER_ID | NAME | TIMESTAMP | CONNECTION_ID | USER | PRIV_USER | SQLTEXT | +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | 0 | 1 | Query | 2012\-09\-28T11:26:50 | 10 | root | root | SET @@GLOBAL\&.audit_log_flush = ON | +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ .fi .if n \{\ .RE .\} .SH "COPYRIGHT" .br .SH "NOTES" .IP " 1." 4 Pattern Matching .RS 4 \%http://dev.mysql.com/doc/refman/5.6/en/pattern-matching.html .RE .IP " 2." 4 Python "re" module docs .RS 4 \%http://docs.python.org/2/library/re.html .RE .IP " 3." 4 audit log plugin enabled .RS 4 \%http://dev.mysql.com/doc/refman/5.6/en/audit-log-plugin-installation.html .RE .SH "SEE ALSO" For more information, please refer to the MySQL Utilities section of the MySQL Workbench Reference Manual, which is available online at http://dev.mysql.com/doc/workbench/en/. .SH AUTHOR Oracle Corporation (http://dev.mysql.com/). mysql-utilities-1.6.1/docs/man/mysqlfailover.10000644001577100000120000010103312473641047020633 0ustar pb2userwheel'\" t .\" Title: \fBmysqlfailover\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 10/03/2013 .\" Manual: MySQL Utilities .\" Source: MySQL 1.4.0 .\" Language: English .\" .TH "\FBMYSQLFAILOVER\FR" "1" "10/03/2013" "MySQL 1\&.4\&.0" "MySQL Utilities" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .\" mysqlfailover .\" utilities: mysqlfailover .\" scripts .SH "NAME" mysqlfailover \- Automatic replication failover .SH "SYNOPSIS" .HP \w'\fBmysqlfailover\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u \fBmysqlfailover [\fR\fB\fIoptions\fR\fR\fB]\fR .SH "DESCRIPTION" .PP This utility permits users to perform replication health monitoring and automatic failover on a replication topology consisting of a master and its slaves\&. The utility is designed to run interactively or continuously refreshing the health information at periodic intervals\&. Its primary mission is to monitor the master for failure and when a failure occurs, execute failover to the best slave available\&. The utility accepts a list of slaves to be considered the candidate slave\&. .PP This utility is designed to work exclusively for servers that support global transaction identifiers (GTIDs) and have GTID_MODE=ON\&. MySQL server versions 5\&.6\&.9 and higher support GTIDs\&. See the MySQL server online reference manual for more information about setting up replication with GTIDs enabled\&. .PP The user can specify the interval in seconds to use for detecting the master status and generating the health report using the \fB\-\-interval\fR option\&. At each interval, the utility will check to see if the server is alive via a ping operation followed by a check of the connector to detect if the server is still reachable\&. The ping operation can be controlled with the \fB\-\-ping\fR option (see below)\&. .PP If the master is found to be offline or unreachable, the utility will execute one of the following actions based on the value of the \fB\-\-failover\-mode\fR option\&. .PP \fBauto\fR Execute automatic failover to the list of candidates first and if no slaves are viable, continue to locate a viable candidate from the list of slaves\&. If no slaves are found to be a viable candidate, the utility will generate and error and exit\&. .PP Once a candidate is found, the utility will conduct failover to the best slave\&. The command will test each candidate slave listed for the prerequisites\&. Once a candidate slave is elected, it is made a slave of each of the other slaves thereby collecting any transactions executed on other slaves but not the candidate\&. In this way, the candidate becomes the most up\-to\-date slave\&. .PP \fBelect\fR This mode is the same as auto except if no candidates specified in the list of candidate slaves are viable, it does not check the remaining slaves and generates and error and exits\&. .PP \fBfail\fR This mode produces an error and does not failover when the master is downed\&. This mode is used to provide periodic health monitoring without the failover action taken\&. .PP For all options that permit specifying multiple servers, the options require a comma\-separated list of connection parameters in the following form (where the password, port, and socket are optional)\&.: .sp .if n \{\ .RS 4 .\} .nf <*user*>[:<*passwd*>]@<*host*>[:<*port*>][:<*socket*>] or <*login\-path*>[:<*port*>][:<*socket*>] .fi .if n \{\ .RE .\} .PP The utility permits users to discover slaves connected to the master\&. In order to use the discover slaves feature, all slaves must use the \-\-report\-host and \-\-report\-port startup variables to specify the correct hostname and ip port of the slave\&. If these are missing or report the incorrect information, the slaves health may not be reported correctly or the slave may not be listed at all\&. The discover slaves feature ignores any slaves it cannot connect to\&. .PP The discover slaves feature is run automatically on each interval\&. .PP The utility permits the user to specify an external script to execute before and after the switchover and failover commands\&. The user can specify these with the \fB\-\-exec\-before\fR and \fB\-\-exec\-after\fR options\&. The return code of the script is used to determine success thus each script must report 0 (success) to be considered successful\&. If a script returns a value other than 0, the result code is presented in an error message\&. .PP The utility also permits the user to specify a script to be used for detecting a downed master or an application\-level event to trigger failover\&. This can be specified using the \fB\-\-exec\-fail\-check\fR option\&. The return code for the script is used to invoke failover\&. A return code of 0 indicates failover should not take place\&. A return code other than 0 indicates failover should take place\&. This is checked at the start of each interval if a script is supplied\&. The timeout option is not used in this case and the script is run once at the start of each interval\&. .PP The utility permits the user to log all actions taken during the commands\&. The \fB\-\-log\fR option requires a valid path and file name of the file to use for logging operations\&. The log is active only when this option is specified\&. The option \fB\-\-log\-age\fR specifies the age in days that log entries are kept\&. The default is seven (7) days\&. Older entries are automatically deleted from the log file (but only if the \fB\-\-log\fR option is specified)\&. .PP The format of the log file includes the date and time of the event, the level of the event (informational \- INFO, warning \- WARN, error \- ERROR, critical failure \- CRITICAL), and the message reported by the utility\&. .PP The interface provides the user with a number of options for displaying additional information\&. The user can choose to see the replication health report (default), or choose to see the list of GTIDs in use, the UUIDs in use, and if logging is enabled the contents of the log file\&. Each of these reports is described below\&. .PP \fBhealth\fR Display the replication health of the topology\&. This report is the default view for the interface\&. By default, this includes the host name, port, role (MASTER or SLAVE) of the server, state of the server (UP = is connected, WARN = not connected but can ping, DOWN = not connected and cannot ping), the GTID_MODE, and health state\&. .PP The master health state is based on the following; if GTID_MODE=ON, the server must have binary log enabled, and there must exist a user with the REPLICATE SLAVE privilege\&. .PP The slave health state is based on the following; the IO_THREAD and SQL_THREADS must be running, it must be connected to the master, there are no errors, the slave delay for non\-gtid enabled scenarios is not more than the threshold provided by the \fB\-\-max\-position\fR and the slave is reading the correct master log file, and slave delay is not more than the \fB\-\-seconds\-behind\fR threshold option\&. .PP At each interval, if the discover slaves option was specified at startup and new slaves are discovered, the health report is refreshed\&. .PP \fBgtid\fR: Display the master\*(Aqs list of executed GTIDs, contents of the GTID variables; @@GLOBAL\&.GTID_EXECUTED, @@GLOBAL\&.GTID_PURGED, and @@GLOBAL\&.GTID_OWNED\&. Thus, the user can toggle through four screens by pressing the \*(AqG\*(Aq key repeatedly\&. The display will cycle through all four screens restarting after the fourth screen\&. .PP \fBUUID\fR: Display universally unique identifiers (UUIDs) for all servers\&. .PP \fBLog\fR: This option is visible only if the \fB\-\-log\fR option is specified\&. Show the contents of the log file\&. This can be helpful to see at a later time when failover occurred and the actions or messages recorded at the time\&. .PP The user interface is designed to match the size of the terminal window in which it is run\&. A refresh option is provided to permit users to resize their terminal windows or refresh the display at any time\&. However, the interface will automatically resize to the terminal window on each interval\&. .PP The interface will display the name of the utility, the master\*(Aqs status including binary log file, position, and filters as well as the date and time of the next interval event\&. .PP The interface will also permit the user to scroll up or down through a list longer than what the terminal window permits\&. When a long list is presented, the scroll options become enabled\&. The user can scroll the list up with the up arrow key and down with the down arrow key\&. .PP Use the \fB\-\-verbose\fR option to see additional information in the health report and additional messages during failover\&. .PP The utility supports two modes of operation\&. The default mode, running as a console, works as described above\&. An additional mode that permits you to run the utility as a daemon is provided for POSIX platforms\&. .PP When run as a daemon, the utility does not have interactivity\&. However, all events are written to the log file\&. You can control what is written to the log by using the \fB\-\-report\-values\fR option\&. .PP To run the utility as a daemon, use the \fB\-\-daemon\fR option\&. There are three commands that can by used in \fB\-\-daemon\fR option\&. These include: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} start .sp Starts the daemon\&. The \fB\-\-log\fR option is required\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} stop .sp Stops the daemon\&. If you used the option \fB\-\-pidfile\fR, the value must be the same when starting the daemon\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} restart .sp Restarts the daemon\&. If you used the option \fB\-\-pidfile\fR, the value must be the same when starting the daemon\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} nodetach .sp Starts the daemon, but it will not detach the process from the console\&. The \fB\-\-log\fR option is required\&. .RE .PP The utility supports two modes of operation\&. The default mode, running as a console, works as described above\&. An additional mode that permits you to run the utility as a daemon is provided for POSIX platforms\&. .PP When run as a daemon, the utility does not have interactivity\&. However, all events are written to the log file\&. You can control what is written to the log by using the \fB\-\-report\-values\fR option\&. .PP To run the utility as a daemon, use the \fB\-\-daemon\fR option\&. There are three commands that can by used in \fB\-\-daemon\fR option\&. These include: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} start .sp Starts the daemon\&. The \fB\-\-log\fR option is required\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} stop .sp Stops the daemon\&. The option \fB\-\-pidfile\fR must be the same when starting the daemon\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} restart .sp Restarts the daemon\&. The option \fB\-\-pidfile\fR must be the same when starting the daemon\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} nodetach .sp Starts the daemon, but it will not detach the process from the console\&. The \fB\-\-log\fR option is required\&. .RE OPTIONS .PP \fBmysqlfailover\fR accepts the following command\-line options: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-help .sp Display a help message and exit\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-candidates= .sp Connection information for candidate slave servers for failover in the form: <\fIuser\fR>[:<\fIpasswd\fR>]@<\fIhost\fR>[:<\fIport\fR>][:<\fIsocket\fR>] or <\fIlogin\-path\fR>[:<\fIport\fR>][:<\fIsocket\fR>]\&. Valid only with failover command\&. List multiple slaves in comma\-separated list\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-daemon= .sp Run as a daemon\&. It can be \fBstart\fR (start daemon), \fBstop\fR (stop daemon), \fBrestart\fR (stop then start the daemon) or \fBnodetach\fR (start but do not detach the process)\&. This option is only available for POSIX systems\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-discover\-slaves\-login= .sp At startup, query master for all registered slaves and use the user name and password specified to connect\&. Supply the user and password in the form <\fIuser\fR>[:<\fIpasswd\fR>] or <\fIlogin\-path\fR>\&. For example, \-\-discover=joe:secret will use \*(Aqjoe\*(Aq as the user and \*(Aqsecret\*(Aq as the password for each discovered slave\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \-\-exec\-after=