Houdini HQueue集群渲染文档

Switching to MySQL (Linux only)

Switching to MySQL (Linux only)

You can optionally configure HQueue to use MySQL instead of SQLite on Linux.


On this page
Overview

Required packages

Setting up MySQL


Overview

By default, HQueue uses SQLite as a backend database. If the HQueue server is on Linux, you can configure it to use MySQL instead.

You may want to do this if you already have a MySQL server infrastructure that’s centrally managed, backed-up, and so on.

The following procedure does not migrate the contents of the default database over to MySQL. You will need to re-add clients, groups, and jobs after switching to MySQL.

Required packages

You must install the following Linux packages on the server machine, for example using aptitude or yum (depending on the Linux distribution):

  • mysql-client

  • mysql-server

  • python-mysqldb

The packages may be named differently depending on your Linux distribution.

Setting up MySQL

  1. Create the hqserver database.Start a mysql session and run:
    
    

    You can also create an hquser user account which has access to the database. In your mysql session, enter the following commands:

    
    
  2. Edit the HQueue configuration file.Open /opt/hqueue/hqserver.ini and look for the line with the sqlalchemy.default.url configuration value. Replace it with:
    
    

    If you created the hquser account, then this would be:

    
    

    Additionaly, uncomment the lines with the sqlalchemy.default.pool_size and sqlalchemy.default.max_overflowconfiguration values.

  3. Shutdown the HQueue server.In a terminal run:
    
    
  4. Find out where Python MySQLdb is installed.In a terminal run python and then in Python type:
    
    

    You will need to remember where the MySQLdb module is installed for later use. With the example above, the install location would be /usr/local/lib/python2.7/dist-packages/MySQL_python-1.2.5-py2.7-linux-x86_64.egg.

  5. Modify the HQueue paster script so it can find Python MySQLdb.Open /opt/hqueue/bin/paster in a text editor. Then insert this line after the line that reads import sys:
    
    

    Save and close the file.

  6. Setup the hqserver database.In a terminal, run:
    
    
  7. Restart the HQueue server.In a terminal, run:
    
    

Now your HQueue server is configured to use a MySQL database.

点击分享到: