Mysql your visual blueprint for creating open source databases- P15

Chia sẻ: Cong Thanh | Ngày: | Loại File: PDF | Số trang:20

lượt xem

Mysql your visual blueprint for creating open source databases- P15

Mô tả tài liệu
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

Mysql your visual blueprint for creating open source databases- P15:The show tables command displays a list of tables available in the currently selected database. You can use this command when you are unsure of the exact name of a table within the database.

Chủ đề:

Nội dung Text: Mysql your visual blueprint for creating open source databases- P15

  1. MYSQL COMMAND REFERENCE B ADMINISTRATIVE COMMANDS M ySQL includes a variety of administrative commands for managing tables, processes, users, and various server components. OPTIMIZE TABLE FLUSH QUERY CACHE The OPTIMIZE TABLE command sorts a table's index This command arranges MySQL's cache of queries in files and reclaims any space used by deleted rows. To memory to conserve memory. Use the command RESET use this command, specify the table name. QUERY CACHE to clear this cache completely. Example: FLUSH TABLES OPTIMIZE TABLE address; This command closes and reopens all MySQL tables, and clears the query cache. CHECK TABLE The CHECK TABLE command checks a table for errors. FLUSH STATUS Specify a table name and optionally one or more of the This command resets most of the status variables that keywords QUICK, FAST, CHANGED, MEDIUM, or EXTENDED. are shown with the SHOW STATUS command. These variables are also cleared each time you start the Example: MySQL server. CHECK TABLE address; KILL REPAIR TABLE This command stops a thread on the MySQL server. The REPAIR TABLE command attempts to repair a Specify the process ID number, available from the damaged table. You can optionally specify the keywords output of SHOW PROCESSLIST. QUICK for a fast scan or EXTENDED for a more thorough scan. Example: KILL 3931; ANALYZE TABLE The ANALYZE TABLE command analyzes a table's GRANT content and configures its keys for use in future queries. The GRANT command grants one or more privileges to a To use this command, specify the table name. user of the MySQL server. If the user does not already exist, it is created. Specify the privileges to grant, the FLUSH HOSTS database and table names, the TO keyword followed by The FLUSH HOSTS command clears the host cache the username, and the IDENTIFIED BY keywords tables MySQL uses to manage access by users from followed by a password. remote hosts. This allows access by users who were previously blocked due to connection errors. Example: GRANT ALL ON testdb.quotes FLUSH LOGS TO fred IDENTIFIED BY 'password'; This command closes and reopens the MySQL log files. It is useful if you have changed logging settings or if you REVOKE are backing up or deleting old data in the log files. The REVOKE command takes away one or more privileges from a user of the MySQL server. Specify the privileges to FLUSH PRIVILEGES revoke, the FROM keyword, and the username. This command reloads the MySQL grant tables, used to control access by users. This is useful if you have made Example: changes to the tables manually. REVOKE ALL ON testdb.quotes FROM fred; 267
  2. APPENDIX COMMAND-LINE UTILITIES M ySQL includes a number of utilities that can be used from the command prompt on a UNIX or Windows system. These are described in the following sections. MYSQL This command starts the MySQL monitor, a After you are in the MySQL monitor, you can type any MySQL command-line interface that enables you to command. The monitor also supports a number of special enter MySQL commands and view their commands: results. COMMAND DESCRIPTION COMMAND DESCRIPTION \c Clears the current command -? Display a complete list of \e Edits the command in a text editor options \g Executes the current command -D Select a database to use \G Executes the current command and displays a -h Specify the host (server name vertical result or IP address) \h Displays a list of commands and their -p Specify the password to descriptions access the server \p Displays the current command -P Specify the TCP/IP port \q Exits the MySQL monitor number for the server \r Attempts to reconnect to the server -u Specify a username for the server \s Displays MySQL status information -V Display server version number \ Executes MySQL commands from a specified file MYSQLADMIN The mysqladmin utility runs from a client machine and supports Example: a number of different commands for managing the MySQL server. mysqladmin extended-status Type mysqladmin followed by the command name. COMMAND DESCRIPTION COMMAND DESCRIPTION create Create a database kill Stop one or more server processes drop Drop a database variables List MySQL variables and their ping Check whether the server is values running version Display the MySQL server version status Display basic status information number extended-status Display a detailed status report shutdown Shut down the MySQL server processlist Show a list of the current MySQL password Change the password for the server processes current MySQL user 268
  3. MYSQL COMMAND REFERENCE B MYSQLDUMP The mysqldump utility dumps the contents of a table or an entire database to the screen, and you can redirect its output to a file. This command creates a file of SQL commands to re-create the table. OPTION DESCRIPTION OPTION DESCRIPTION -A or --all-databases Includes all databases on -h or --host Specifies the server hostname the server for the MySQL server -C or --compress Attempts to compress data -u or --user Specifies the MySQL username -B or --databases Backs up multiple databases -p or --password Specifies the password —help Displays a complete list of options -t or --no-create-info Writes data only, no table structure -f or --force Ignores MySQL errors To use mysqldump, specify a database and a list of Example: tables on the command line. If you do not specify mysqldump -uuser -ppassword testdb address tables, the entire database is included in the dump. >backup.sql MYISAMCHK The myisamchk utility checks MyISAM tables OPTION DESCRIPTION for errors and optionally attempts to repair any problems found. This utility works directly on -e Extended check: slow but more thorough the MySQL data files, and should be used while -m Medium check: faster than extended the server is not running or no users are accessing the tables being checked. -F Fast check: only checks improperly closed tables -C Checks only tables changed since the last check Example: myisamchk –r /var/mysql/data/testdb/address -i Displays information about the table while checking -f Automatically repairs the table if any errors are detected The following table describes some of the most useful command-line options for the -r Recover: attempts to repair table and recover data myisamchk utility. -o Safe recover: uses a slower and safer recovery method -q Quick recover: checks index files only -w Waits until no clients are locking the table before checking 269
  4. APPENDIX WHAT'S ON THE CD-ROM different versions of the same program, contact the T he CD-ROM included in this book contains many useful files and programs. Before installing any of the program's manufacturer. For the latest and greatest programs on the disc, make sure that you do not information, please refer to the ReadMe file located at the already have a newer version of the program already root level of the CD-ROM. installed on your computer. For information on installing SYSTEM REQUIREMENTS ACROBAT VERSION To use the contents of the CD-ROM, your computer must The CD-ROM contains an e-version of this book that you have the following hardware and software: can view and search using Adobe Acrobat Reader. You can also use the hyperlinks provided in the text to access all the • A PC with a Pentium or faster processor Web pages and Internet references in the book. You cannot • Microsoft Windows 95, 98, ME, NT, 2000, or XP; or Linux print the pages or copy text from the Acrobat files. The or UNIX. MySQL can also be compiled on other systems, CD-ROM includes a freeware version of Adobe Acrobat such as Mac OSX. Reader. • At least 128MB of physical RAM installed on your computer INSTALLING AND USING THE SOFTWARE • A double-speed (8x) or faster CD-ROM drive For your convenience, the software titles appearing on the • A monitor capable of displaying at least 256 colors or CD-ROM are listed alphabetically. grayscale • A network card Acrobat Reader For Windows 95/98/NT/2000 and Linux. Freeware. AUTHOR'S SOURCE CODE Adobe Acrobat Reader allows you to view the online These files include SQL files you can use to create the version of this book. For more information on using Acrobat example tables used throughout the book as well as the Reader, see the section "Using the E-Version of this Book" in sample PHP and Perl code from Chapters 12 and 13. You this appendix. For more information about Acrobat Reader can browse the files directly from the CD-ROM, or you can and Adobe Systems, see copy them to your hard drive and use them as the basis for your own projects. To find the files on the CD-ROM, open Apache the \Samples folder on the CD-ROM drive. For Windows and UNIX. Open source. To import an SQL file, use the MySQL monitor from the Apache is a Web server from the Apache Software command line and specify the database: Foundation. It is used throughout the world on a large number of Web sites. It supports PHP and Perl as modules mysql testdb
  5. WHAT'S ON THE CD-ROM C MySQL PHP is free, open source software. For more information For Windows and UNIX. GNU version. about PHP or to download the latest version, visit the Web site. MySQL is a fast and reliable database management system. It includes powerful features that allow you to add, access, and process information stored in databases. The latest phpMyAdmin version of MySQL also features full-text searching and For Windows and UNIX. GNU version. indexing capabilities. phpMyAdmin administers the MySQL database management MySQL is free for non-commercial use. For more system on the Web. It allows you to create and edit information about MySQL or to download server or databases and tables, execute SQL statements, and client software, visit the Web site. administer multiple databases and servers. Perl TROUBLESHOOTING For Windows and UNIX. Open source. The programs on the CD-ROM should work on computers with the minimum of system requirements. However, some Perl is a powerful scripting language with features that programs may not work properly. make it ideal for text processing and as a language for dynamic Web pages. Perl is a popular language for creating The two most likely problems for the programs not working database applications and database-driven Web sites with properly include not having enough memory (RAM) for the MySQL. programs you want to use, or having other programs running that affect the installation or running of a program. If you Perl is open source software. For more information about receive error messages such as Not enough memory or Perl or to download source code or binary distributions, Setup cannot continue, try one or more of the methods visit the Web site. below and then try using the software again: Perl DBI and DBD: MySQL • Turn off any anti-virus software For Windows and UNIX. GNU version. • Close all running programs The DBI is a programmatic interface that allows the Perl • In Windows, close the CD-ROM interface and run language to connect to a variety of database management demos or installations directly from Windows Explorer systems, including MySQL. It supports DBDs, or database • Have your local computer store add more RAM to your drivers, for each database system. The MySQL DBD is also computer included on the CD-ROM. If you still have trouble installing the items from the The DBI and the MySQL DBD are open source software. CD-ROM, call the Wiley Customer Service phone number: For more information on the DBI or to download the latest 800-762-2974 (outside the U.S.: 317-572-3994). You can also version, visit the Web site at contact Wiley Customer Service by e-mail at PHP For Windows and UNIX. Open source. PHP is a powerful server-side scripting language that integrates with HTML. You must have PHP installed on your Web server in order to create and view PHP Web pages. 271
  6. APPENDIX USING THE E-VERSION OF THIS BOOK Acrobat Reader is a popular and useful program. There are Y ou can view MySQL: Your visual blueprint to open source database management on your screen using many files available on the Web that are designed to be the CD-ROM included at the back of this book. The viewed using Acrobat Reader. Look for files with the .pdf CD-ROM allows you to search the contents of each chapter extension. For more information about Acrobat Reader, of the book for a specific word or phrase. The CD-ROM visit the Web site at also provides a convenient way of keeping the book handy reader.html. while traveling. To view the contents of the book using Acrobat Reader, You must install Adobe Acrobat Reader on your computer display the main menu on the CD-ROM. Click the eBook before you can view the book on the CD-ROM. The link, select the section of the book you want to view, and CD-ROM includes this program for your convenience. then click Install. Acrobat Reader allows you to view Portable Document Format (PDF) files, which can display books and magazines on your screen exactly as they appear in printed form. USING THE FIG HEAD E-VERSION OF THIS BOOK FLIP THROUGH PAGES First page ZOOM IN s Click one of these options to display the page at 100% ⁄ Click one of these options Previous page ⁄ Click to magnify an magnification ( ) or to fit to flip through the pages of a area of the page. Next page the entire page inside the section. ¤ Click the area of the page window ( ). Last page you want to magnify. 272
  7. WHAT'S ON THE CD-ROM C To install Acrobat Reader, insert the CD-ROM When you search for text, the text that Acrobat into a drive. In the screen that appears, click Reader highlights may be difficult to read. To make Software. Click Acrobat Reader and then follow highlighted text easier to read, turn off the font the instructions on your screen to install the smoothing capabilities of Acrobat Reader. In the program. Acrobat Reader window, click Edit ➪ Preferences. Click Display at the left side of the Preferences You can make searching the book more dialog box. In the Smoothing area, click Smooth convenient by copying the PDF files to your Text ( changes to ), and then click OK. computer. To do this, display the contents of the CD-ROM and then copy the Book folder from the CD-ROM to your hard drive. This allows you to easily access the contents of the book at any time. database FIND TEXT ¤ Type the text you want to s The first instance of the › Click Find Again to find find. text is highlighted. the next instance of the text. ⁄ Click to search for text in the section. ‹ Click Find to start the search. s The Find dialog box appears. 273
  8. APPENDIX WILEY PUBLISHING, INC. backup or archival purposes. You may not (i) rent or lease END-USER LICENSE AGREEMENT the Software, (ii) copy or reproduce the Software through a LAN or other network system or through any computer READ THIS. You should carefully read these terms and subscriber system or bulletin-board system, or (iii) modify, conditions before opening the software packet(s) included adapt, or create derivative works based on the Software. with MySQL: Your visual blueprint to open source database management ("Book"). This is a license agreement (b) You may not reverse engineer, decompile, or ("Agreement") between you and Wiley Publishing, Inc. disassemble the Software. You may transfer the Software ("WPI"). By opening the accompanying software packet(s), and user documentation on a permanent basis, provided you acknowledge that you have read and accept the that the transferee agrees to accept the terms and following terms and conditions. If you do not agree and do conditions of this Agreement and you retain no copies. If not want to be bound by such terms and conditions, the Software is an update or has been updated, any transfer promptly return the Book and the unopened software must include the most recent update and all prior versions. packet(s) to the place you obtained them for a full refund. 4. Restrictions on Use of Individual Programs. 1. License Grant. WPI grants to you (either an individual or entity) a You must follow the individual requirements and nonexclusive license to use one copy of the enclosed restrictions detailed for each individual program in software program(s) (collectively, the "Software") solely for Appendix C of this Book. These limitations are also your own personal or business purposes on a single contained in the individual license agreements recorded on computer (whether a standard computer or a workstation the Software Media. These limitations may include a component of a multi-user network). The Software is in use requirement that after using the program for a specified on a computer when it is loaded into temporary memory period of time, the user must pay a registration fee or (RAM) or installed into permanent memory (hard disk, discontinue use. By opening the Software packet(s), you will CD-ROM, or other storage device). WPI reserves all rights be agreeing to abide by the licenses and restrictions for not expressly granted herein. these individual programs that are detailed in Appendix C and on the Software Media. None of the material on this 2. Ownership. Software Media or listed in this Book may ever be redistributed, in original or modified form, for commercial WPI is the owner of all right, title, and interest, including purposes. copyright, in and to the compilation of the Software recorded on the disk(s) or CD-ROM "Software Media." 5. Limited Warranty. Copyright to the individual programs recorded on the Software Media is owned by the author or other authorized (a) WPI warrants that the Software and Software Media copyright owner of each program. Ownership of the are free from defects in materials and workmanship under Software and all proprietary rights relating thereto remain normal use for a period of sixty (60) days from the date of with WPI and its licensers. purchase of this Book. If WPI receives notification within the warranty period of defects in materials or workmanship, 3. Restrictions On Use and Transfer. WPI will replace the defective Software Media. (a) You may only (i) make one copy of the Software for backup or archival purposes, or (ii) transfer the Software to a single hard disk, provided that you keep the original for 274
  9. WHAT'S ON THE CD-ROM C (b) WPI AND THE AUTHOR OF THE BOOK DISCLAIM (c) Because some jurisdictions do not allow the exclusion ALL OTHER WARRANTIES, EXPRESS OR IMPLIED, or limitation of liability for consequential or incidental INCLUDING WITHOUT LIMITATION IMPLIED damages, the above limitation or exclusion may not apply WARRANTIES OF MERCHANTABILITY AND FITNESS FOR to you. A PARTICULAR PURPOSE, WITH RESPECT TO THE SOFTWARE, THE PROGRAMS, THE SOURCE CODE 7. U.S. Government Restricted Rights. CONTAINED THEREIN, AND/OR THE TECHNIQUES DESCRIBED IN THIS BOOK. WPI DOES NOT WARRANT Use, duplication, or disclosure of the Software for or on THAT THE FUNCTIONS CONTAINED IN THE SOFTWARE behalf of the United States of America, its agencies and/or WILL MEET YOUR REQUIREMENTS OR THAT THE instrumentalities "U.S. Government" is subject to OPERATION OF THE SOFTWARE WILL BE ERROR FREE. restrictions as stated in paragraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause of DFARS (c) This limited warranty gives you specific legal rights, and 252.227-7013, or subparagraphs (c) (1) and (2) of the you may have other rights that vary from jurisdiction to Commercial Computer Software - Restricted Rights clause jurisdiction. at FAR 52.227-19, and in similar clauses in the NASA FAR supplement, as applicable. 6. Remedies. 8. General. (a) WPI's entire liability and your exclusive remedy for defects in materials and workmanship shall be limited to This Agreement constitutes the entire understanding of the replacement of the Software Media, which may be returned parties and revokes and supersedes all prior agreements, to WPI with a copy of your receipt at the following address: oral or written, between them and may not be modified or Software Media Fulfillment Department, Attn.: MySQL: Your amended except in a writing signed by both parties hereto visual blueprint to open source database management, that specifically refers to this Agreement. This Agreement Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, shall take precedence over any other documents that may IN 46256, or call 1-800-762-2974. Please allow four to six be in conflict herewith. If any one or more provisions weeks for delivery. This Limited Warranty is void if failure of contained in this Agreement are held by any court or the Software Media has resulted from accident, abuse, or tribunal to be invalid, illegal, or otherwise unenforceable, misapplication. Any replacement Software Media will be each and every other provision shall remain in full force and warranted for the remainder of the original warranty period effect. or thirty (30) days, whichever is longer. (b) In no event shall WPI or the author be liable for any damages whatsoever (including without limitation damages for loss of business profits, business interruption, loss of business information, or any other pecuniary loss) arising from the use of or inability to use the Book or the Software, even if WPI has been advised of the possibility of such damages. 275
  10. APPENDIX GNU GENERAL PUBLIC LICENSE know that what they have is not the original, so that any problems introduced by others will not reflect on the Version 2, June 1991 original authors' reputations. Copyright © 1989, 1991 Free Software Foundation, Inc. Finally, any free program is threatened constantly by 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA software patents. We wish to avoid the danger that redistributors of a free program will individually obtain Everyone is permitted to copy and distribute verbatim patent licenses, in effect making the program proprietary. copies of this license document, but changing it is not To prevent this, we have made it clear that any patent must allowed. be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution, PREAMBLE and modification follow. 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 TERMS AND CONDITIONS FOR COPYING, freedom to share and change free software—to make sure DISTRIBUTION AND MODIFICATION the software is free for all its users. This General Public 0. This License applies to any program or other work License applies to most of the Free Software Foundation's which contains a notice placed by the copyright holder software and to any other program whose authors commit saying it may be distributed under the terms of this to using it. (Some other Free Software Foundation software General Public License. The "Program", below, refers to is covered by the GNU Library General Public License any such program or work, and a "work based on the instead.) You can apply it to your programs, too. Program" means either the Program or any derivative work under copyright law: that is to say, a work When we speak of free software, we are referring to containing the Program or a portion of it, either freedom, not price. Our General Public Licenses are verbatim or with modifications and/or translated into designed to make sure that you have the freedom to another language. (Hereinafter, translation is included distribute copies of free software (and charge for this without limitation in the term "modification".) Each service if you wish), that you receive source code or can get licensee is addressed as "you". 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 Activities other than copying, distribution and can do these things. modification are not covered by this License; they are outside its scope. The act of running the Program is not To protect your rights, we need to make restrictions that restricted, and the output from the Program is covered forbid anyone to deny you these rights or to ask you to only if its contents constitute a work based on the surrender the rights. These restrictions translate to certain Program (independent of having been made by running responsibilities for you if you distribute copies of the the Program). Whether that is true depends on what the software, or if you modify it. Program does. For example, if you distribute copies of such a program, 1. You may copy and distribute verbatim copies of the whether gratis or for a fee, you must give the recipients all Program's source code as you receive it, in any the rights that you have. You must make sure that they, too, medium, provided that you conspicuously and receive or can get the source code. And you must show appropriately publish on each copy an appropriate them these terms so they know their rights. copyright notice and disclaimer of warranty; keep We protect your rights with two steps: (1) copyright the intact all the notices that refer to this License and to software, and (2) offer you this license which gives you legal the absence of any warranty; and give any other permission to copy, distribute and/or modify the software. recipients of the Program a copy of this License along with the Program. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no You may charge a fee for the physical act of transferring warranty for this free software. If the software is modified a copy, and you may at your option offer warranty by someone else and passed on, we want its recipients to protection in exchange for a fee. 276
  11. WHAT'S ON THE CD-ROM C 2. You may modify your copy or copies of the Program or storage or distribution medium does not bring the any portion of it, thus forming a work based on the other work under the scope of this License. Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that 3. You may copy and distribute the Program (or a work you also meet all of these conditions: based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 a) You must cause the modified files to carry above provided that you also do one of the following: prominent notices stating that you changed the files and the date of any change. a) Accompany it with the complete corresponding machine-readable source code, which must be b) You must cause any work that you distribute or distributed under the terms of Sections 1 and 2 publish, that in whole or in part contains or is above on a medium customarily used for software derived from the Program or any part thereof, to be interchange; or, licensed as a whole at no charge to all third parties under the terms of this License. b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no c) If the modified program normally reads commands more than your cost of physically performing source interactively when run, you must cause it, when distribution, a complete machine-readable copy of started running for such interactive use in the most the corresponding source code, to be distributed ordinary way, to print or display an announcement under the terms of Sections 1 and 2 above on a including an appropriate copyright notice and a medium customarily used for software interchange; notice that there is no warranty (or else, saying that or, you provide a warranty) and that users may redistribute the program under these conditions, c) Accompany it with the information you received as and telling the user how to view a copy of this to the offer to distribute corresponding source code. License. (Exception: if the Program itself is (This alternative is allowed only for noncommercial interactive but does not normally print such an distribution and only if you received the program in announcement, your work based on the Program is object code or executable form with such an offer, not required to print an announcement.) in accord with Subsection b above.) These requirements apply to the modified work as a The source code for a work means the preferred whole. If identifiable sections of that work are not form of the work for making modifications to it. For derived from the Program, and can be reasonably an executable work, complete source code means considered independent and separate works in all the source code for all modules it contains, plus themselves, then this License, and its terms, do not any associated interface definition files, plus the apply to those sections when you distribute them as scripts used to control compilation and installation separate works. But when you distribute the same of the executable. However, as a special exception, sections as part of a whole which is a work based on the source code distributed need not include the Program, the distribution of the whole must be anything that is normally distributed (in either on the terms of this License, whose permissions for source or binary form) with the major components other licensees extend to the entire whole, and thus (compiler, kernel, and so on) of the operating system to each and every part regardless of who wrote it. on which the executable runs, unless that component itself accompanies the executable. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely If distribution of executable or object code is made by you; rather, the intent is to exercise the right to by offering access to copy from a designated place, control the distribution of derivative or collective then offering equivalent access to copy the source works based on the Program. code from the same place counts as distribution of the source code, even though third parties are not In addition, mere aggregation of another work not compelled to copy the source along with the object based on the Program with the Program (or with a code. work based on the Program) on a volume of a 277
  12. APPENDIX 4. You may not copy, modify, sublicense, or distribute the It is not the purpose of this section to induce you to Program except as expressly provided under this infringe any patents or other property right claims or to License. Any attempt otherwise to copy, modify, contest validity of any such claims; this section has the sublicense or distribute the Program is void, and will sole purpose of protecting the integrity of the free automatically terminate your rights under this License. software distribution system, which is implemented by However, parties who have received copies, or rights, public license practices. Many people have made from you under this License will not have their licenses generous contributions to the wide range of software terminated so long as such parties remain in full distributed through that system in reliance on compliance. consistent application of that system; it is up to the author/donor to decide if he or she is willing to 5. You are not required to accept this License, since you distribute software through any other system and a have not signed it. However, nothing else grants you licensee cannot impose that choice. permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if This section is intended to make thoroughly clear what you do not accept this License. Therefore, by modifying is believed to be a consequence of the rest of this or distributing the Program (or any work based on the License. Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, 8. If the distribution and/or use of the Program is distributing or modifying the Program or works based restricted in certain countries either by patents or by on it. copyrighted interfaces, the original copyright holder who places the Program under this License may add an 6. Each time you redistribute the Program (or any work explicit geographical distribution limitation excluding based on the Program), the recipient automatically those countries, so that distribution is permitted only in receives a license from the original licensor to copy, or among countries not thus excluded. In such case, distribute or modify the Program subject to these terms this License incorporates the limitation as if written in and conditions. You may not impose any further the body of this License. restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing 9. The Free Software Foundation may publish revised compliance by third parties to this License. and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit 7. If, as a consequence of a court judgment or allegation to the present version, but may differ in detail to of patent infringement or for any other reason (not address new problems or concerns. limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) Each version is given a distinguishing version number. If that contradict the conditions of this License, they do the Program specifies a version number of this License not excuse you from the conditions of this License. If which applies to it and "any later version", you have the you cannot distribute so as to satisfy simultaneously option of following the terms and conditions either of your obligations under this License and any other that version or of any later version published by the pertinent obligations, then as a consequence you may Free Software Foundation. If the Program does not not distribute the Program at all. For example, if a specify a version number of this License, you may patent license would not permit royalty-free choose any version ever published by the Free redistribution of the Program by all those who receive Software Foundation. copies directly or indirectly through you, then the only way you could satisfy both it and this License would be 10. If you wish to incorporate parts of the Program into to refrain entirely from distribution of the Program. other free programs whose distribution conditions are different, write to the author to ask for permission. For If any portion of this section is held invalid or software which is copyrighted by the Free Software unenforceable under any particular circumstance, the Foundation, write to the Free Software Foundation; we balance of the section is intended to apply and the sometimes make exceptions for this. Our decision will section as a whole is intended to apply in other be guided by the two goals of preserving the free status circumstances. of all derivatives of our free software and of promoting the sharing and reuse of software generally. 278
  14. INDEX Symbols ALL keyword, 208, 209 ALTER privilege, 209 primary keys and, 64 sequential numbers for, 83 & (ampersand), 16 ALTER TABLE command AUTO_INCREMENT attribute, 37, 43, ' (apostrophe), 161 add columns with, 56–57, 62, 64–65, 106 64–65, 75, 82–83. See also * (asterisk), 7, 89, 124, 208, 243 add indexes with, 58–60, 202 auto-increment columns @ (at symbol), 154, 208, 212, 216, 242 add primary keys with, 60–61 averages, calculate, 109, 126–127 \ (backslash), 156, 159, 161 change column types with, 68–69 AVG function, 126–127 ^ (caret), 243 delete columns with, 70–71 AVG_ROW_LENGTH option, 37, 41 , (comma), 57, 111, 159 delete indexes with, 72–73 $ (dollar sign), 243 described, 54–55 B " (double quotes), 161, 242 improve performance with, 189 back_log variable, 195 = (equal sign), 37 multiple operations with, 73 backslash (\), 156, 159, 161 / (forward slash), 33, 38 rename columns with, 66–67 backup(s) () (parentheses), 36, 42, 44, 57 rename tables with, 74 automated, 170–171 % (percent sign), 34, 40, 114, 142, 152, 208 security and, 209 DROP DATABASE command and, 32 . (period), 33, 35, 38, 243 syntax of, 54 DROP TABLE command and, 52 + (plus sign), 243 TYPE= option, 75 importance of, 30 ? (question mark), 243 American Standard Code for Information mysqldump utility and, 157, 168–169 ; (semicolon), 18, 24, 29, 35 Interchange. See ASCII text files restore files from, 157, 169 ' (single quote), 242 ampersand (&), 16 table structure, 172, 173 [ ] (square brackets), 242 AND keyword, 105, 111 BDB (Berkeley DB) tables, 31, 75 _ (underscore), 33, 34, 40, 114, 142 AND operator, 116–117 bench directory, 15 ANSI (American National Standards benchmark utilities, 10, 11, 15 A Institute), 6 BIGINT column type, 42 aborted_clients variable, 197 Apache Web server. See also servers bin directory, 15, 17, 184 aborted_connects variable, 197 compatibility of, with MySQL, 3 binary log files, 201. See also log files ABS function, 134, 139 Perl and, 242, 245, 247 binary operators, 155 Access (Microsoft), 5, 166–167 PHP and, 218, 220–221, 229 binary versions ACOS function, 135 apostrophe ('), 161 of MySQL, 8–9, 11, 13 action attribute, 239 arithmetic operators, 134, 219, 242 of PHP, 220–221 ActivePerl, 246–247 arrays, 218, 242 BIT_AND (bitwise AND) function, 127 ActiveState, 246, 248 AS keyword, 113, 129, 145 BIT_COUNT function, 155 ADD COLUMN command, 54 ASC keyword, 77, 93, 111 BIT_OR (bitwise OR) function, 127 ADD INDEX command, 55, 58–61 ASCII (American Standard Code for BLOB (Binary Large Object) Information Interchange) text column type, 44, 188 ADD PRIMARY KEY command, 55, 69 files, 133, 141. See also text files ADD UNIQUE clause, 202 tag, 251 ASCII function, 141 ADDATE (DATE_ADD) function, 149 bytes ASIN function, 135 addition (+) operator, 134, 219, 242 described, 42, 258 asterisk (*), 7, 89, 124, 208, 243 administration tools, 174–175 SET columns and, 49 at symbol (@), 154, 208, 212, 216, 242 Administrator accounts, 181, 214 bytes_received variable, 197 ATAN function, 135 AFTER keyword, 56, 57, 66 bytes_sent variable, 197 authentication, 207 AIX, 5, 9 aliases auto-increment columns. See also AUTO_INCREMENT attribute; columns C assign, 145 add, 64–65 caret (^), 243 described, 113 described, 43, 82–83 case-sensitivity, of commands, 19 retrieve data from multiple integers and, 64 CEILING function, 135 tables with, 129 PHP and, 235 central processing units. See CPUs 280
  15. MYSQL: Your visual blueprint to open source database management CGI (Common Gateway Interface), 229, execute, 25, 26–27 CREATE TABLE command 245, 251, 256 save changes to, 26 create archive tables with, 95, 256 COMMENT keyword, 75 described, 6, 36–39 CHANGE command, 54, 66–68 comments, 75 indexed tables and, 50, 61 CHAR column type, 36, 38–39, 44, COMMIT command, 31 INSERT command and, 79 46–47, 56 Common Gateway Interface. See CGI multiple-line queries and, 24 CHAR function, 141 comparison security and, 209 CHAR_LENGTH function, 140 functions, 134 text columns and, 46 CHARACTER_LENGTH function, 140 operators, 111, 138–139 TYPE keyword and, 31 CHECK TABLE command, 193 compile process, 10, 12–13 cron utility, 170 CHECKSUM option, 37 Comprehensive Perl Archive Network. CURDATE function, 148 checksums, 37, 155 See CPAN CURTIME function, 148 CLEAR command, 24, 25 CONCAT function, 113, 140, 144 client(s) CONCAT_WS function, 140 D configuration options and, 28–29, 194 concatenation (.) operator, 219, 242 described, 258 daemon, 16 CONCURRENT option, 156, 162 security and, 206 data concurrent_inserts variable, 195 -server systems, 2, 18 column types, 44–45 conditional statements, 219, 243. software for, 3 See also conditions critical and non-critical, separation of, 30 column(s). See also auto-increment conditions. See also conditional columns; fields statements export, 156–158, 164–167 add, 54, 56–57, 62, 64–65, 106 described, 258 import, 156–157, 160–161, 167 attributes of, 36, 43 select multiple, 116–117 size, reduce, 188 copy, 37 configuration files, 194–195, 198–199 sort, 55, 93, 111, 120–121, 189 default values for, 43 configure command, 220 data directory, 15 delete, 54, 70 configure program, 12–13 database(s). See also DBMSs (database management systems) described, 2, 4, 258 CONNECT command, 25 count rows in, 124–125 fixed-length, 44, 56 connect method, 250, 254 create, 6, 21, 30–33 increment values of, 108–109 connect_timeout variable, 195 delete, 6, 32, 52–53 modify, 54 CONNECTION_ID function, 154 described, 2–4, 258 names, 56, 66–67, 76 connections variable, 197 design basics, 30–31 plan, 30 content, format and, separation of, 3 driver modules (DBD), 247, 248, 249 specify, 36, 80, 110, 111 conversion functions, 141 lists of available, 6, 19, 34 types copy security for, 206 described, 42–43 columns, 37 select, 6, 25, 35 change, 68–69 data between tables, 157 size information, 226 table design and, 188 table structure, 173 view current, 20, 175 update, 97, 104–109 COS function, 135 DATABASE function, 154 variable-length, 37, 44, 46, 188 COT function, 135 Databases tab, 184 width, 43, 63 COUNT function, 124, 126–127 date(s). See also times combine conditions, 111 CPAN (Comprehensive Perl Archive Network), 244 add/subtract, 149, 153 comma (,), 57, 111, 159 CPUs (central processing units), 71, 188 column types, 45 comma-delimited files, 133 CREATE command, 21, 174 components, 148 command(s). See also specific commands CREATE DATABASE command, delete data by, 94–95 case-sensitivity of, 19 6, 21, 32–33 display, 152 clear, 24–25 CREATE INDEX command, 59 format, 149, 151 described, 4, 6 functions, 148–149 display list of, 18, 19, 25 get current, 148 edit, 25, 26–27 work with, 150–152 281
  16. INDEX DATE function, 148–149 disconnect method, 250 Err File tab, 175, 184, 185 DATE_ADD function, 149, 153 disk access, 188 error(s) DATE_FORMAT function, 149, 152 DISTINCT keyword, 125 check tables for, 190–191 DATE_SUB function, 149, 153 division (/) operator, 109, 134, 219, 242 checksums and, 37 DATETIME function, 148–149 DNS (domain name system), 217 CREATE DATABASE command DATETYPE column type, 45 do method, 254, 255 and, 32, 33 DAY_HOUR keyword, 149 Docs directory, 15 DROP TABLE command and, 37, 52 DAY_MINUTE keyword, 149 dollar sign ($), 243 ignore, 88 DAYNAME function, 148 DOS (Disk Operating System) import process and, 163 DAYOFMONTH function, 148 prompt, 16, 18 indexes and, 60 DAYOFWEEK function, 148 DOUBLE column type, 43 log files, 181, 184, 185, 200–201 DAYOFYEAR function, 148 DOUBLE PRECISION column type, 43 MySQL monitor and, 19 DAY_SECOND keyword, 149 double quotes ("), 161, 242 MySQL server and, 179 DB2 (IBM), 5 download PHP and, 233 DBD (database driver) modules, 247,, 256 renamed columns and, 67 248, 249 MySQL, 8–9, 12, 14 repair, 190–191 DBI modules, 247, 248–249, 253–254 MySQLGUI, 28 "unknown column," 80 DBMSs (database management systems). packages, 11, 221 escape characters, 161 See also databases Perl, 243, 248 ESCAPED BY clause, 159, 161–162 described, 5, 258 RPM files, 10 Excel (Microsoft), 164–165, 225 relational (RDBMSs), 2–3 server software, 3 execute method, 252, 256 specific types of, 5 drivers. See DBD (database driver) EXISTS keyword, 32 DEC Alpha, 8 modules EXIT command, 18, 25 DEC OSF, 9 DROP COLUMN command, 54, 70–71 EXP function, 135 DECIMAL column type, 36, 39, 43 drop command, 174 EXPLAIN command, 189 DECODE function, 155 DROP DATABASE command, 6, 32, 52–53 exponential functions, 135 DEFAULT attribute, 36 DROP INDEX command, 55, 72–73, 203 export data, 156–158, 164–167 DEFAULT keyword, 43, 66, 68 DROP PRIMARY KEY command, 55, 72–73 EXTENDED keyword, 192, 193 DEGREES function, 135 DROP TABLE command, 6, 37, 52–53, 209 extended-status command, 174, 175, DELAYED keyword, 81 176, 196 delayed_insert_limit variable, 195 E eXtensible Markup Language. See XML delayed_insert_timeout variable, 195 echo command, 218 delayed_queue_size variable, 195 EDIT command, 25, 26–27, 39 F DELETE command EGO command, 25 FAST keyword, 193 delete data by date with, 94–95 else statement, 236 FAT (File Allocation Table) system, 14 delete rows with, 90–92 emacs, 160, 198 fetchrow_array method, 253 described, 7, 76–77 ENCLOSED BY clause, 159, 161–162 fetchrow_hashref method, 253 Perl and, 252, 255 ENCODE function, 155 fields. See also columns PHP and, 236–237 ENCRYPT function, 155, 224 copy, 37 query syntax and, 21 encryption, 155, 207, 224 create, 37 security and, 209 ENUM column type, 45, 48–49 described, 2, 4 DESC keyword, 77, 93, 111 enumerations, 48–49 enclose, 156, 160 development libraries, 10 Environment tab, 175 separate, 156 directories equal sign (=), 37 text, 46, 114 delete, 53 equal to (=) operator, 111, 115, FIELDS ENCLOSED BY option, 156, 160 MySQL installation and, 12, 13, 14, 15 138, 219, 243 FIELDS ESCAPED BY option, 156 source, 12 .err file extension, 200 FIELDS keyword, 156, 158–159 switch to/from, 12 282
  17. MYSQL: Your visual blueprint to open source database management FIELDS option, 159 H described, 4, 30, 258 FIELDS SEPARATED BY option, 164 disadvantages of, 203 FIELDS TERMINATED BY option, hardware requirements, 3 full-text, 59 156, 162 hashed indexes, 31 improve performance with, 202–203 file(s) header files, 10 names of, 36, 55 execute commands from specified, 25 heap tables, 31, 75 PHP and, 218 extensions, 11, 200, 218, 222, 231 HELP command, 18, 25 primary key, 60–61 systems, 14 hostnames unique, 36, 59–61, 64, 72–73, 259 File Transfer Protocol, 9, 163. See FTP convert, to IP addresses, 217 INNER JOIN clause, 110, 130–131 firewalls, 226 MySQLGUI and, 29 InnoDB tables, 31, 75 FIRST keyword, 54, 56, 57, 66 PHP and, 228 InnoDB Web site, 31 fixed-length columns, 44, 56 security and, 207 INSERT command flat file databases, 5 specify, 19, 22, 29, 216 add data with, 76 FLOAT column type, 43 view current, 20 add rows with, 78–79 FLOOR function, 135 HOUR function, 148 copy data between tables with, 157 FLUSH command, 209 HOUR_MINUTE keyword, 149 copy older data with, 95 FLUSH LOGS command, 201 HOUR_SECOND keyword, 149 copy table structures with, 173 FLUSH PRIVILEGES command, 215 HP-UX, 9 described, 7 flush_time variable, 195 .htaccess file, 223 Perl and, 252, 254 for loops, 219. See also loops HTML (HyperText Markup Language) PHP and, 234–236, 238 form(s) tag, 238–239 query syntax and, 21 create, 238–241 links, to MySQL download pages, 9 security and, 209 database search, 240–241 MySQL documentation and, 15 specify columns for rows with, 80 Perl and, 256–257 tag, 251 specify INSERT priority for, 81 Web, 256–257 PHP and, 218, 231, 238–239 installation tag, 238–239 Web forms and, 256–257 compact, 14 forward slash (/), 33, 38 custom, 14, 15 FreeBSD, 9 I file systems and, 32 FROM clause, 158 IA64 systems, 8 minimal, 10 FROM keyword, 40, 112, 208 IBM (International Business Machines), 6 MySQL, 8–9, 10, 12–15, 17, 32 FROM_DAYS function, 151 IDENTIFIED BY clause, 22, 23, 208 MySQLGUI, 28 FROM_UNIXTIME function, 151 IF EXISTS clause, 32, 37, 52 Perl, 248 FTP (File Transfer Protocol), 9, 163 IF keyword, 32 phpMyAdmin, 222–223 FULLTEXT keyword, 59 IF NOT EXISTS clause, 32, 33, 36 from source code, 12–13 if statements test, 17 G Perl and, 243, 255, 256 typical, 14, 15 geometry functions, 135 PHP and, 219, 233, 234, 236, 238 INSTR function, 141, 147 GO command, 25, 26–27, 123 IGNORE keyword, 88, 97, 101, 156 INTEGER column type, 42 GRANT command, 23, 207–209, 216 IIS (Internet Information Server), 221, 247 integers greater than (>) operator, 111, import data, 156–157, 160–161, 167 auto-increment columns and, 64 114–115, 138, 168, 171, 219, 243 Import Text Wizard, 167 described, 42, 258 greater than or equal to (>=) INDEX keyword, 36, 37 ENUM columns and, 49 operator, 111, 115, 139, 219, 243 indexes. See also ISAM (Indexed Intel, 8 GREATEST function, 134, 139–140 Sequential Access Method) tables interactive_timeout variable, 195 GROUP BY clause, 111, 122, 126–127, 189 add, 55, 58–59, 189, 202 INTERVAL keyword, 149, 153 gzip utility, 11 create, 36, 50–51 INTO keyword, 76 delete, 55, 72–73, 203 INTO OUTFILE option, 156, 158–159, 168 283
  18. INDEX IP (Internet Protocol) addresses, line(s) M 19, 216, 217 breaks, 163 Is equal to (=) operator, 111, 115, go to specific, 24 Macintosh, 9, 221 138, 219, 243 navigate between, 24 mainframe computers, 5 Is greater than (>) operator, 111, LINES option, 159 make command, 12, 248 114–115, 138, 168, 171, 219, 243 make install command, 12, 248, 249 LINES TERMINATED BY option, Is greater than or equal to 156, 159, 162 make test command, 248, 249 (>=) operator, 111, 115, 139, 219, 243 Linux. See also Red Hat Linux math functions, 134–137 Is less than (
  19. MYSQL: Your visual blueprint to open source database management multiplication (*) operator, 134, MySQL Web site, 3, 8, 11–12, 14, 132, 248 mysql_num_rows function, 241 219, 242 mysqladmin mysql_pconnect function, 229 multitasking systems, 14 configuration options and, 194 mysql_query function, 230, 231, my.cnf, 23, 194, 199 described, 174 233–234, 236–237, 240 my.ini, 15, 175, 184–185, 194, 199 display processes with, 182–183 mysql_select_db function, 230, 231, my.ini Setup tab, 175, 184, 199 display variables with, 17, 195–196 233, 234 MyISAM tables, 31, 36, 75, 81, 92, 190–191 extended-status command, 202 mysql.server script, 16 myisamchk, 190–194 flush-privileges command, 215 mysqlshow utility, 34 MySQL client, 4, 6. See also clients kill processes with, 175, 182, 183 MySQL-version-i386.rpm, 10 mysql command, 18–19, 157, 177 password command, 210 mysql directory, 15, 16 ping command, 179 N MySQL monitor processlist command, 174, 182–184 NATURAL JOIN clause, 130–131 backups and, 169 security and, 209 NATURAL LEFT JOIN clause, 131 classification of, as a client, 3, 18 shutdown command, 174, 178, 180, 209 NET START command, 174, 180 clear commands with, 24 start/stop MySQL server with, 181–182 NET STOP command, 174, 180 configuration options and, 194 status command, 17, 175, 176, 184 net_buffer_length variable, 195 described, 6, 18–21, 259 test MySQL installation with, 17 net_read_timeout variable, 195 edit commands with, 25, 26–27 version command, 177 NetWare (Novell), 221 exit, 19, 25 mysql_affected_rows function, Network control panel, 14 start, 18, 19 236–237 network security, 206, 216 test queries with, 21 MySQL-bench-version-i386.rpm, 10 net_write_timeout variable, 195 use commands from, 6 MySQL-client-version-i386.rpm, 10 newline (\n) character, 156, 161 view server status with, 20 mysql_close command, 228 not equal to () operator, 111, MySQL server. See also servers mysql_connect function, 228, 231, 115, 139 auto-increment columns and, 82 233, 234, 235 NOT keyword, 32, 111 backups and, 157, 171 mysqld command, 174, 178, 180 NOT LIKE keyword, 111 column types and, 43 MySQL-devel-version.i386.rpm, 10 NOT LIKE operator, 114–116, 142 configuration options, 15, 194–195 mysqld-max, 16 NOT NULL attribute, 36, 37, 43, 55, 64 connect to, 27, 228–229, 250–251 mysqldump, 157, 168–172 NOT operator, 116–117 delete actions and, 90, 92, 93 mysql.err, 181 Notepad, 27, 160, 199 described, 4, 259 mysql_fetch_assoc function, 232 Novell NetWare, 221 IGNORE option and, 101 mysql_fetch_object function, NOW function, 148, 152 installation and, 12 232, 233, 240, 241 ntbackup.exe, 171 MySQLGUI and, 132, 186–187 mysql_fetch_row function, 230, 232 NTFS (New Technology File System), 14 optimize, 188–189 MySQLGUI NULL attribute, 36, 43, 45, 68, 69. passwords and, 194 classification of, as a client, 3 See also null values performance information, 196–197 configure, 28–29 null values. See also NULL attribute PHP and, 218, 226–227 described, 27 described, 259 reports, 175, 185 display data with, 132–133 special characters for, 161 startup, 16–17, 174, 178–181, 217 edit queries with, 29 timestamp columns and, 84, 85 status information, 20, 175–176, 195, 226 exit, 29 numeric column types, 42–43 stop, 16–17, 174, 178–181 manage MySQL server with, 186–187 numeric comparisons, 111, 138–139 table types and, 75 query syntax and, 29 text columns and, 47 send queries with, 187 O troubleshoot, 188–189 start, 28 objects, store query results as, 232–233 TRUNCATE option and, 92 mysql_insert_id function, 235 Office (Microsoft). See Microsoft Access; UPDATE command and, 96, 107 MySQLManager.exe, 15 Microsoft Excel usernames, 194 MySQL-MAX package, 9, 31, 75 ON keyword, 59, 131, 208 version information, 20, 177 285
  20. INDEX open tables status indicator, 20 DBD (database driver) modules, define, 50–51 opened_tables variable, 197 247, 248, 249 delete, 55, 72–73 open_files variable, 197 DBI modules, 247, 248–249, 253, 254 described, 4, 30, 37, 259 open_tables variable, 197 delete records with, 255 indexes and, 4, 60–61 opens status indicator, 20 described, 3, 242–243, 259 update, 97 operator(s). See also specific operators display query results with, 252–253 PRINT command, 25 arithmetic, 134, 219, 242 flat-file databases and, 5 print statement, 251, 252 binary, 155 insert records with, 254 print_bold function, 219 comparison, 111, 138–139 install, 243–248 priority settings, 76, 81, 100, 156, 162 PHP and, 219 interpreter, 242 privileges. See also security precedence, 137 LIMIT clause and, 119 described, 207, 259 OPTIMIZE TABLE command, 192–193 MySQL installation and, 10, 12 grant, 207, 208–209 OR keyword, 105, 111 operators, 242 PHP and, 234 OR operator, 116–117 SELECT command and, 113 remove, 216 Oracle, 5 Web forms and, 256–257 storage of, in security tables, 214–215 ORDER BY clause persistent connections, 229 view, 212–213 described, 35, 77, 111 PHP Process tab, 175, 184 eliminate, 189 add records with, 238–239 processes. See also threads EXPLAIN command and, 189 delete records with, 236–237 described, 183 LIMIT clause and, 118–119 described, 3–4, 218–219, 259 kill, 182, 183 sort data with, 120–121 display query results with, 230–231 view/manage, 182–183 forms and, 238–241 processlist command, 174, 182–184 P HTML and, 218 processors, 71, 188 insert records from, 234–235 programming languages, described, 3. tag, 251 installation, 220–221 See also specific languages packages, 8, 10–11, 13, 201, 244–245 LIMIT clause and, 119 ps command, 183 paged output, specify programs to use, 25 SELECT command and, 113 PAGER command, 25 parentheses ( ), 36, 42, 44, 57 store query results as objects with, Q 232–233 password(s). See also security QUARTER function, 148 Web site, 220, 221 authentication of, 207 queries. See also specific commands .php file extension, 218, 222, 231 backups and, 157 client-server systems and, 2 .php3 file extension, 218, 222, 231 configuration options and, 194 described, 2, 4, 259 phpinfo command, 220 encryption of, 155, 207 edit long, 26–27 phpMyAdmin, 222–227 guidelines for, 206, 211 multiple-line, 24–27 physical security, 206. See also security modify, 23, 174, 210–211, 215 per second measure, 20 PI function, 135 MySQL monitor and, 18, 19, 22–23 slow, 20, 197 pico text editor, 26–27, 160, 198 MySQL server and, 132 specify, 24–25 ping command, 174, 176, 179 MySQLGUI and, 28 syntax for, 18, 21, 24, 29, 189 plus sign (+), 243 PHP and, 223, 228 question mark (?), 243 POSIX regular expression standard, 143 root user, 23, 207 questions variable, 197 PostgreSQL, 5 specify, 18, 19, 22, 23, 211 QUICK keyword, 192, 193 POWER function, 135 password command, 174 QUICK option, 90, 192, 193 PPM (Perl Package Manager), 248 PASSWORD function, 155, 211 percent sign (%), 34, 40 prepare method, 252, 256 primary keys R period (.), 33, 35, 38, 243 add, 55 RADIANS function, 135 Perl auto-increment columns and, 64 RAM (random-access memory). connect to MySQL server with, 250–251 See memory create, 37 customize MySQL clients with, 4 286
Đồng bộ tài khoản