PDF (A4) - 43.4Mb
Man Pages (TGZ) - 297.1Kb
Man Pages (Zip) - 402.3Kb
Info (Gzip) - 4.3Mb
Info (Zip) - 4.3Mb
MySQL Globalization
MySQL Information Schema
MySQL Installation Guide
Security in MySQL
Starting and Stopping MySQL
MySQL and Linux/Unix
MySQL and Windows
MySQL and macOS
MySQL and Solaris
Building MySQL from Source
MySQL Restrictions and Limitations
MySQL Partitioning
MySQL Tutorial
MySQL Performance Schema
MySQL Replication
Using the MySQL Yum Repository
MySQL NDB Cluster 8.0
In MySQL Shell, you can create new collections, get a list of the existing collections in a schema, and remove an existing collection from a schema. Collection names are case-sensitive and each collection name must be unique.
To show the value that is assigned to the schema variable, issue:
mysql-js> db If the schema value is notSchema:world_x, then set thedb variable by issuing:
mysql-js> \use world_x To create a new collection in an existing schema, use thedb object'screateCollection() method. The following example creates a collection calledflags in theworld_x schema.
mysql-js> db.createCollection("flags")The method returns a collection object.
<Collection:flags>
To display all collections in theworld_x schema, use thedb object'sgetCollections() method. Collections returned by the server you are currently connected to appear between brackets.
mysql-js> db.getCollections()[ <Collection:countryinfo>, <Collection:flags>] To drop an existing collection from a schema, use thedb object'sdropCollection() method. For example, to drop theflags collection from the current schema, issue:
mysql-js> db.dropCollection("flags") ThedropCollection() method is also used in MySQL Shell to drop a relational table from a schema.
SeeCollection Objects for more examples.
PDF (A4) - 43.4Mb
Man Pages (TGZ) - 297.1Kb
Man Pages (Zip) - 402.3Kb
Info (Gzip) - 4.3Mb
Info (Zip) - 4.3Mb
MySQL Globalization
MySQL Information Schema
MySQL Installation Guide
Security in MySQL
Starting and Stopping MySQL
MySQL and Linux/Unix
MySQL and Windows
MySQL and macOS
MySQL and Solaris
Building MySQL from Source
MySQL Restrictions and Limitations
MySQL Partitioning
MySQL Tutorial
MySQL Performance Schema
MySQL Replication
Using the MySQL Yum Repository
MySQL NDB Cluster 8.0