common_schema distribution file is a SQL source file. To install it, you should execute it on your MySQL server.
There are many ways to import a SQL file into MySQL, listed below. Make sure to execute them as a privileged user, e.g. 'root'@'localhost', as installation involves creation of schema, tables, views & routines.
Consult the download page for obtaining the common_schema distribution file.
- Within MySQL, issue (replace "common_schema_distribution_file" with actual file name):
mysql> SOURCE '/path/to/common_schema_distribution_file.sql';
- From shell, execute:
bash$ mysql < /path/to/common_schema_distribution_file.sql
- Use your favorite MySQL GUI editor, copy+paste file content, execute.
To verify installation, check that the common_schema database exists. e.g.:
root@mysql> SHOW DATABASES; +--------------------+ | Database | +--------------------+ | information_schema | | common_schema | | mysql | | sakila | | world | +--------------------+
The common_schema distribution file supports MySQL 5.1, 5.5 and 5.6, Oracle distribution, Percona Server and MariaDB.
Percona Server features are supported for versions >= 5.5.8. TokuDB features are supported on TokuDB enabled servers. Please note that common_schema will install regardless of the version. It will automatically recognize available feature set and install accordingly. Likewise, it will install regardless of the availability of InnoDB Plugin and associated INFORMATION_SCHEMA tables.
If you should upgrade your MySQL server, or enable features which were turned off during install of common_schema, the new feature set are not automatically available by common_schema, and a re-install of common_schema is required.
The installation process drops and creates various tables and routines. In particular, the installation process breaks any running QueryScript code. Avoid installing common_schema during QueryScript executions.
Since installation is merely an import act, you should only expect trouble if schema generation is unable to execute on your server.
- Are you executing on a 5.0 MySQL server? This version is not supported.
- Were errors reported during installation process?
- What was common_schema's last message during install?
- What is the output of SELECT * FROM common_schema.status?