Trang 2
goupee.vn goupee.com Summary of Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi 1. Getting Started with MySQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2. Storing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3. Retrieving and Updating Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 4. Working with Multiple Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 5. Connecting from Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 6. Programming the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 7. Backups and Replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 fb.com/goupee.vn www.allitebooks.com
Trang 5
iv goupee.vn goupee.com Jump Start MySQL by Timothy Boronczyk Copyright © 2015 SitePoint Pty. Ltd. Product Manager: Simon Mackie English Editor: Ralph Mason Technical Editor: Peter Nijssen Cover Designer: Alex Walker Notice of Rights All rights reserved. No part of this book may be reproduced, stored in a retrieval system or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embodied in critical articles or reviews. Notice of Liability The author and publisher have made every effort to ensure the accuracy of the information herein. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors and SitePoint Pty. Ltd., nor its dealers or distributors will be held liable for any damages to be caused either directly or indirectly by the instructions contained in this book, or by the software or hardware products described herein. Trademark Notice Rather than indicating every occurrence of a trademarked name as such, this book uses the names only in an editorial fashion and to the benefit of the trademark owner with no intention of infringement of the trademark. Published by SitePoint Pty. Ltd. 48 Cambridge Street Collingwood VIC Australia 3066 Web: www.sitepoint.com Email: business@sitepoint.com ISBN 978-0-9924612-8-7 (print) ISBN 978-0-9941826-3-0 (ebook) Printed and bound in the United States of America fb.com/goupee.vn www.allitebooks.com
Trang 6
v goupee.vn goupee.com About Timothy Boronczyk Timothy Boronczyk is a native of Syracuse, NY, where he works as a senior developer at ShoreGroup, Inc. He's been involved with Web technologies since 1998, has a degree in Software Application Programming, and is a Zend Certified Engineer. In what little spare time he has left, Timothy enjoys hanging out with friends, speaking Esperanto, and sleeping with his feet off the end of the bed. He's easily distracted by shiny objects. About SitePoint SitePoint specializes in publishing fun, practical, and easy-to-understand content for web professionals. Visit http://www.sitepoint.com/ to access our blogs, books, newsletters, articles, and community forums. You’ll find a stack of information on JavaScript, PHP, Ruby, mobile development, design, and more. fb.com/goupee.vn www.allitebooks.com
Trang 8
goupee.vn goupee.com Table of Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi What is a Database? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi From Codd to MySQL, a Brief History . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii Alternatives and the Future of MySQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv Who Should Read This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi Conventions Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi Code Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi Tips, Notes, and Warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii Supplementary Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii Want to Take Your Learning Further? . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii Chapter 1 Getting Started with MySQL . . . . . . . . . . 1 Installing MySQL on Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Installing via a Package Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Installing from Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Installing MySQL on Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Communicating with the Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 MySQL Accounts and Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Chapter 2 Storing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Creating Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Data Types and Storage Requirements . . . . . . . . . . . . . . . . . . . . . . . 20 Storage Engines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Adding Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Using Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 fb.com/goupee.vn www.allitebooks.com
Trang 9
viii goupee.vn goupee.com Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Chapter 3 Retrieving and Updating Data . . . . . . . 37 Deploying Sakila . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Retrieving Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Ordering Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Managing the Number of Returned Rows . . . . . . . . . . . . . . . . . . . . 44 Aggregate Functions and Grouping . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Keeping Data Fresh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Updating Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Deleting Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Chapter 4 Working with Multiple Tables . . . . . . . 57 Joining Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Types of Joins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 Abstracting with Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Normal Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 First Normal Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Second Normal Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 Third Normal Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Altering Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 Chapter 5 Connecting from Code . . . . . . . . . . . . . . . . . . 77 Connecting from Python with Connector/Python . . . . . . . . . . . . . . . . . . 78 Basic Querying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 Buffered and Unbuffered Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Prepared Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 fb.com/goupee.vn www.allitebooks.com
Trang 10
ix goupee.vn goupee.com Connecting from PHP with PDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 Basic Querying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Handling Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Prepared Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Connecting from R with RMySQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 Working with Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 Basic Querying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Chapter 6 Programming the Database . . . . . . . . . . . 95 Learning the Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Stored Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 User-defined Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 Chapter 7 Backups and Replication . . . . . . . . . . . . 121 Logical Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 Using mysqldump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Redirecting SELECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 Physical Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 Replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 Setting up Replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 Fixing Broken Replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 Plan Ahead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 fb.com/goupee.vn www.allitebooks.com
Trang 12
goupee.vn goupee.com Preface From “big data” data sets in an enterprise data center to hand-scribbled shopping lists, data is everywhere. Corporations collect as much of it as they can and analyze it to formulate new business strategies. Scientists study data looking for answers that can save lives, improve our environment, and explain our place in the universe. Even the average person maintains a fair amount of data, from ledgers detailing one’s spending habits to phone numbers in a cellphone’s address book. Storing and organizing all of this this data has become so easy that we often take for granted many of the database concepts and algorithms that make these things possible. This book is an introduction to the basic concepts of working with a Relational Database Management System (RDBMS)—specifically, the popular, open source RDBMS MySQL. Like other installments in SitePoint’s Jump Start series, it aims to give you a head start in your understanding of the chosen technology. You’ll learn the basics quickly, in a friendly, (hopefully) pain-free way, and have a solid foundation to continue on in your learning. I’m very grateful to have been given the opportunity to write this book. What separ- ates it from others in the lineup is that it discusses a technology widely used both within and outside the world of web development. That’s not to say MySQL isn’t popular with developers creating web-based applications—quite the contrary! But databases are used in many other areas as well and I've tried to capture this in my selection of topics. What is a Database? Although we tend to associate the word database with the digital world of computers, the term simply refers to any organized collection of data. A database can therefore be digital/electronic or physical. The filing cabinet full of financial records that sits in the corner of your home office is a physical database. The cookbooks on your bookshelf, with their dog-eared pages and extra recipes clipped from magazines tucked inside, can also be viewed as a physical database. In the digital world, databases are classified by how they organize and store their data. Some common types of digital databases are: fb.com/goupee.vn
Trang 13
xii goupee.vn goupee.com ■ Flat file databases ― these store data sequentially, often in plain text files. They are easy to create and to add data to but they also have several drawbacks. Flat file databases are slow to search, may contain redundant data, and can easily become corrupted. An example of this type of database is the text file created by a solitaire game to store users’ high scores. ■ Hierarchical databases ― these organize data in parent/child relationships. They are highly organized and searching is efficient, but hierarchical databases are difficult to navigate when you’re not familiar with their relationships. Maintaining data relationships over time can be difficult as well. The Windows Registry is an example of a hierarchical database. ■ Key-value/document-oriented databases ― these store free-form data indexed by a key or hash value. They typically scale across wide network topologies very well but share many of the problems with flat file databases. They often contain redundant data, do not maintain relationships, and searching them can be slow. Redis and CouchDB are popular “NoSQL” database systems that manage these types of databases. ■ Relational databases ― these organize data in rows and tables, much like a printed price list or bus schedule can be organized as a table. Relational databases can support indexing large amounts of data for quick retrieval, but the relation- ships between tables can become very complex. Sitting above most modern digital databases is a database server, an application designed specifically for managing databases, and which is responsible for marshal- ing access to the underlying data. We never work directly with a database in such systems. Instead, we send requests to add, update, remove, or fetch the desired data to the server. The server performs the requested actions on our behalf and forwards the results on to us. The book you’re reading right now focuses on MySQL, a database server that manages relational databases. Since the mid 1980s, Structured Query Language (SQL) has been the standard language used to communicate with relational database management systems. SQL consists of statements for adding, retrieving, and managing data, creating and maintaining tables, and even managing databases. Statements can be divided into categories or “sub-languages” based on their purpose: those pertaining to data storage and retrieval make up the Data Manipulation Language (DML), those for fb.com/goupee.vn
Trang 14
xiii goupee.vn goupee.com table and database management make up the Data Definition Language (DDL), and those that grant or revoke access to the database make up the Data Control Language (DCL). It’s good to know about these if they come up in conversation at your next database administrator cocktail party, but I don’t make such fine distinctions here. I’ll refer to DML, DDL, and DCL statements all collectively as SQL. From Codd to MySQL, a Brief History Early databases organized their data into tree or graph structures and accessing the data required a programmer to write code to directly traverse these structures. This was a fragile approach and it was risky to add or update data, or to change the data’s organization. Edgar Codd challenged this approach in 1970 in his paper A Relational Model of Data for Large Shared Data Banks. He argued that a superior approach would be to organize data into tables and to treat it independently from relationship, ordering, and indexing information. This was an intriguing concept at the time and engineers at IBM’s San Jose Research Laboratory began work on System R, a project to prove the validity of Codd’s theories. The System R project produced the first implementation of SQL and proved that the relational concepts championed by Codd were sound. When Larry Ellison heard about the research going into the System R prototype, he was so impressed that he incorporated Codd’s ideas and the SQL language into his own database server, Oracle. Incidentally, Ellison beat IBM to market in 1979 and Oracle became the first com- mercially available relational database management system. Meanwhile, computer science professors at the University of California, Berkeley, had also taken an interest in Codd’s paper. The university obtained funding from the National Science Foundation and the research divisions of the United States Air Force and the United States Army and set a rotating team of students—led by Michael Stonebraker—to work on University INGRES. INGRES explored many of Codd’s relational ideas, but also implemented its own query language called QUEL. As students graduated and went on to work at other software companies, commercial INGRES-inspired systems and clones appeared, most notably Sybase (later licensed to Microsoft and rebranded as Microsoft SQL Server). INGRES itself was commer- cialized and quickly became a market leader. INGRES’ position of dominance started to decline 1985 when public sentiment shifted in favor of SQL over QUEL. SQL was accepted as a standard by both the fb.com/goupee.vn
Trang 15
xiv goupee.vn goupee.com American National Standards Institute and the International Organization for Standards by 1987, and the decade came to a close with Oracle and SQL on top. In 1993, David Hughes was developing a network-monitoring application that stored data in a Postgres (a successor of INGRES) managed database. For portability, he also wanted to provide an SQL interface to the data so he wrote a QUEL-to-SQL translator which he named miniSQL. As work continued on his monitoring app, Hughes grew frustrated by Postgres’ hardware requirements and decided to evolve miniSQL into his own light-weight database management system. miniSQL favored a small resource footprint over complete adherence to the SQL standards, imple- menting only the most important subset of the standards. Hughes distributed his system for a fraction of the cost that current commercial offerings were licensed at and miniSQL went on to become the first low-cost, SQL-based relational database system. The stage was now set for MySQL. At that same time, Monty Widenius was developing web-based applications for the still-burgeoning Internet using UNIREG, his own home-grown database server. Widenius found that accessing UNIREG to generate dynamic pages was too resource intensive and began to look for an alternative. miniSQL piqued his interest, as it had grown very popular due to its pricing strategy—especially among shared hosting providers—but it didn’t implement some of the features Widenius’ applications needed. He ended up rewriting UNIREG for better performance, but also took the opportunity to reimplement its API to be compatible with miniSQL’s. This would allow him to take take advantage of the many third-party utilities that had sprung up for miniSQL. Widenius renamed his server MySQL and a friend convinced him to release it publicly. MySQL was made available under the GNU General Public License, and Widenius and his friends, David Axmark and Allan Larsson, founded MySQL AB in 1995 to shepherd the development of MySQL and provide alternative licensing and support for commercial customers. Whereas miniSQL was affordable, for most users MySQL was practially free. Since the licensing terms for MySQL were amenable for inclusion in most Linux distributions, and because its API was compatible with miniSQL but made more features available, MySQL quickly ate most of miniSQL’s market share. Today, MySQL is the second most popular SQL RDBMS (the number one spot is held by SQLite thanks in large part to its use in smartphones and embedded software). fb.com/goupee.vn
Trang 16
xv goupee.vn goupee.com Alternatives and the Future of MySQL Sun Microsystems bought MySQL AB in 2008 for $1 billion, and in 2010, Oracle Corporation acquired Sun Microsystems and its assets (including MySQL) for $7.4 billion. The same company that beat IBM and INGRES in the 1980s now owned the copyrights to MySQL. And Oracle already had its own flagship database, so any fears the community had about the future of MySQL under Sun were only exacer- bated by the Oracle acquisition. But thanks to the GPL, anyone can make improvements and build upon MySQL, so long as those changes are properly licensed. This means others can make enhance- ments to MySQL, or even fork it, and release their own version. And forks there are! ■ Dorsal Source ― the first MySQL fork made by Proven Scaling in response to complaints over Sun’s slow release process and the company handled com- munity-submitted bug fixes and enhancements. The project is now defunct. ■ Drizzle1 ― a fork of MySQL by Brian Aker with the goal of being a faster, pared- down version of MySQL specifically for supporting web applications. Core functionality is provided by a kernel and additional features are provided by plugins. The project isn’t defunct, but development seems to have stalled. ■ Percona Server2 ― a fork maintained by the consulting firm Percona LLC. Its goal is to be a drop-in MySQL replacement that offers improved performance and various enterprise-grade features not found in Oracle’s Community edition. ■ MariaDB3 ― a fork by Monty Widenius himself in response to the Sun and Oracle acquisitions. It aims to be a community-friendly replacement that maintains feature-parity for most use cases. 1 http://www.drizzle.org/ 2 http://www.percona.com/software/percona-server 3 https://mariadb.org/ fb.com/goupee.vn
Trang 17
xvi goupee.vn goupee.com Learn More about the Forks To learn more about the MySQL forks, watch the talk “Different MySQL Forks for Different Folks4” given by Sheeri Cabral at Confoo in 2013. The long-term outlook for the MySQL “brand” is strong despite tensions in the community. Oracle hasn’t shuttered MySQL as many feared, and the quality of re- leases has actually improved under their stewardship. The forks provide competition, which hopefully is a good thing. Even in the most cynical sense, the past decade has seen an uptick in the use of open source in the enterprise setting so MySQL won’t be going anywhere anytime soon. Who Should Read This Book This book is aimed at those interested in working with data and want to learn how to use MySQL. To get the most out of some parts of this book, you should have some previous programming experience, although no specific language is required. Conventions Used You’ll notice that we’ve used certain typographic and layout styles throughout the book to signify different types of information. Look out for the following items: Code Samples Code in this book will be displayed using a fixed-width font, like so: <h1>A Perfect Summer's Day</h1> <p>It was a lovely day for a walk in the park. The birds were singing and the kids were all back at school.</p> If additional code is to be inserted into an existing example, the new code will be displayed in bold: function animate() { new_variable = "Hello"; } 4 https://www.youtube.com/watch?v=dcWoHusSAsE fb.com/goupee.vn
Trang 18
xvii goupee.vn goupee.com Where existing code is required for context, rather than repeat all the code, a vertical ellipsis will be displayed: function animate() { ⋮ return new_variable; } Some lines of code are intended to be entered on one line, but we’ve had to wrap them because of page constraints. A ➥ indicates a line break that exists for formatting purposes only, and should be ignored: URL.open("http://www.sitepoint.com/blogs/2015/05/28/user-style-she ➥ets-come-of-age/"); Tips, Notes, and Warnings Hey, You! Tips will give you helpful little pointers. Ahem, Excuse Me … Notes are useful asides that are related—but not critical—to the topic at hand. Think of them as extra tidbits of information. Make Sure You Always … … pay attention to these important points. Watch Out! Warnings will highlight any gotchas that are likely to trip you up along the way. Supplementary Materials http://www.learnable.com/books/jsmysql1/ The book’s website, which contains links, updates, resources, and more. fb.com/goupee.vn
Trang 19
xviii goupee.vn goupee.com http://community.sitepoint.com/ SitePoint’s forums, for help on any tricky web problems. books@sitepoint.com Our email address, should you need to contact us for support, to report a prob- lem, or for any other reason. Want to Take Your Learning Further? Thanks for buying this book—we appreciate your support. Do you want to continue learning? You can now gain unlimited access to courses and ALL SitePoint books at Learnable for one low price. Enroll now and start learning today! Join Learnable and you’ll stay ahead of the newest technology trends: http://www.learnable.com. fb.com/goupee.vn
Trang 20
goupee.vn goupee.com Chapter1 Getting Started with MySQL This chapter presents the first steps of getting started with MySQL. I’ll show you how to install MySQL on both Linux and Windows systems, so be sure to follow along on the platform of your choice. Then you’ll begin to get acquainted with MySQL’s command-line client as we use it to connect to the database server and create our first database. Often the first step of installing an application is to determine which version is appropriate, so it’s worth noting that MySQL is available in several “flavors.” From Oracle there is the freely available Community Edition and the paid commercial Standard, Enterprise, and Cluster Carrier Grade editions. The differences between Community Edition and the paid versions boil down to licensing and support con- tracts, some additional server plugins, and backup and monitoring utilities. MySQL is open-source software released under the GNU General Public License so it should come as no surprise there are also alternative forks available. Two popular forks are MariaDB, a community-maintained “enhanced, drop-in replacement” for MySQL, and Percona Server, a drop-in maintained by the consulting firm Percona LLC. The differences between MySQL, MariaDB, and Percona are mostly impercept- ible to the casual user. fb.com/goupee.vn www.allitebooks.com
Hiển thị 20 trang đầu. Tải tài liệu để xem đầy đủ.
Bình luận (0)
Chưa có bình luận nào. Hãy là người đầu tiên!