How to configure MySQL backend in Plastic SCM 2.0
It's very simple to set up, you only need to create (or edit) a file named 'db.conf' at the server installation directory.
Its content must be like the following:
Note: The line <ConnectionString>....</ConnectionString> must be on one complete line, it has been splitted here for the sake of clarity.
<DbConfig>
<ProviderName>mysql</ProviderName>
<ConnectionString>
Server=_SERVER_;User ID=_USER_;Password=_PASSWORD_;Database={0};Pooling=true
</ConnectionString>
<DatabasePath></DatabasePath>
</DbConfig>
replacing the parameters _SERVER_, _USER_ and _PASSWORD_ with the appropiate ones according to the server configuration that you want to use. Thus, a valid 'db.conf' file in our development environment would be:
<DbConfig>
<ProviderName>mysql</ProviderName>
<ConnectionString>
Server=venus;User ID=myuser;Password=mypwd;Database={0};Pooling=true
</ConnectionString>
<DatabasePath></DatabasePath>
</DbConfig>
Finally, we must set the mysql configuration parameter max_allowed_packet to support up to 10MB. If you require more information about how configure this parameter, you can take a look at this article.
Updated articles are maintained in the knowledge base of Codice Software at: http://www.plasticscm.com/infocenter/technical-articles.aspx
Hi!!!
ReplyDeleteFirstable should I create the database in the server???
Thanks.
No, just configure the db.conf file, then start up the plastic server and the databases will be automatically created.
ReplyDeleteCheck loader.log.txt for possible connection errors (mysql setup, you know, privileges and stuff)
Hello again
ReplyDeleteI'm following all the steps but I can't see the schema (database)in the Mysql Administrator. How can I see if the database has been created?
The server administrator has created an user: plasticscm, and it's what I'm using. Should it be the root user?
ReplyDeleteHi Carlos,
ReplyDeleteYou've to configure the connection string first.
Once it is configured, you can connect to mysql using the same user you've specified for the conn str.
You should see at least three new databases: workspaces, repositories and rep_1
You can list them using "show databases;" from the MySQL command line client.
But, if they're not created, there must be a problem with the server or the connstr... You'll see it in loader.log.txt file at your plastic server's location.
Feel free to contact support@codicesoftware.com if you feel you need more help.
Hi
ReplyDeleteBut the user that I've specified for the connection string, Must be firstable created on MySQL Administrator??? or it will be created at start up of application??
Hi Carlos,
ReplyDeleteNo, you should create the user first. Plastic won't create the user.
Hope it helps