|
MySQL is a popular enterprise-class, open-source database. This is your best choice if you need a free, open-source database.
For downloads and documentation for all platforms, see the MySQL Developer Zone web site. You'll need the MySQL Community Server component for the database itself. You can choose to install the gui tool, MySQL Workbench, for graphical server administration, or you can use the MySQL Command Line Client. The MySQL Command Line Client is installed as part of the database server, while the gui client is a separate install that you can get from the developer zone.
Installing the Database Server
First, install the Database Server component. Once you've installed the server, the last screen will give you the option to Configure the MySQL Server. If you select this, it will open a new wizard for configuration. Two parts in the configuration that are especially important: Port Number and Root Password. You will need to know both while getting your database setup and while configuring CodeCollaborator to work with your database. For information on configuring your database server, go to the MySQL Documentation and select your MySQL version.
NOTE: It is important to make sure you are using InnoDB tables. Using InnoDB tables will scale better for multiple users than MyISAM. For questions regarding configuring you MySQL database tables, see http://dev.mysql.com/doc/refman/5.0/en/mysql-config-wizard-database-usage.html.
Configuring the Database
CodeCollaborator requires that a database be created. The MySQL Server install will not create a database for you. This is a manual step that you need to do.
You can create a database using the MySQL Command Line Client, or using MySQL Workbench. If you plan to use the MySQL gui client, it is important to know that the MySQL GUI Tools Bundle is reaching end of life. The instructions given in this documentation use the functionality in the current gui client, MySQL Workbench.
The steps below for creating a database were written using MySQL Workbench 5.2.16 and are subject to change. As always, the most reliable source for database creation steps is MySQL Workbench Documentation.
| 2) |
Create a connection to your database server. |
| a) |
From the Home screen, under Server Administration, select New Server Instance. |
| b) |
Follow the steps in the New Server Instance Wizard. |
| a) |
Go back to the Home tab. |
| b) |
Under SQL Development, select the database server connection you provided in step 2. |
| c) |
In the Object Explorer, right-click and select Create Schema. |
| d) |
A screen will appear and prompt you to provide a schema name. Once you've done that, click Apply. |
| e) |
You will be shown the command used to create the schema, and given an option to edit it. |
| f) |
Once the create command is as you want it, click Apply. |
| g) |
You will be returned to the screen you saw in step 3d. Click Finish. |
We recommend that you create a user specifically for your CodeCollaborator database rather than using the super-user, root. To do this in MySQL Workbench, see the documentation at MySQL Schema Privileges.
All of these changes go into effect immediately. You do not have to restart the MySQL server for changes to take effect.
During the GUI installation screens for the CodeCollaborator server, you will be prompted for the MySQL server host name, TCP/IP port, database name, user name, and password. The installer will report any connectivity errors. When you visit the web page for CodeCollaborator it will detect that you have a new database and will create all tables, indexes, and views for you automatically.
The following SQL script can be used to create a database and a database user for CodeCollaborator and configure the required permissions for that user (be sure to change the database name, user login and password as appropriate):
CREATE DATABASE IF NOT EXISTS ccollabdb CHARACTER SET utf8 COLLATE utf8_unicode_ci;
CREATE USER 'collabuser' IDENTIFIED BY 'password';
GRANT
ALTER,
CREATE,
CREATE TEMPORARY TABLES,
CREATE VIEW,
DELETE,
DROP,
EXECUTE,
INDEX,
INSERT,
LOCK TABLES,
SELECT,
UPDATE
ON TABLE ccollabdb.*
TO collabuser;
FLUSH PRIVILEGES;
| 1. |
MySQL v4.x does not support the concept of a database VIEW object. Therefore custom reporting views are only present with v5.x servers. |
| 2. |
Important: The MySQL native restore feature does not automatically clear the database before restoring from backup. You can use the MySQL native restore feature, but you must manually drop all tables in the database before you run the restore. By doing this, you'll ensure an exact reproduction of your backed-up database. Option two is to use the alternative method provided by CodeCollaborator. |
|