If you wish to use a PostgreSQL server installed locally rather than using the default Built-In database then you should install and configure the PostgreSQL database prior to installing and Configuring Hypersocket. If you are using Windows then you'll need to download and install PostgreSQL, go to http://www.postgresql.org/download/ and download the PostgreSQL distribution that works best for you.
Install the PostgreSQL distribution, once complete open the pgAdmin application, there should be one server for localhost in the Object Browser, connect to this if you are not already.
Go to the Login Roles section, right click and select the New Login Role option, now to create the hypersocket user. Set the Role name to hypersocket, in Definition you can enter a password for the user, in this case set that to hypersocket as well.
Now go to the Databases section, right click and select the New Database option. Set the name hypersocket, set the owner as the hypersocket user that was just created
The Hypersocket table has now been created, now install Hypersocket.
For a Windows installation the user will automatically be prompted to setup their database as one of the final parts of the configuration. The user must set Hypersocket's operational ports and then the database to be used, here they will be able to select the PostgreSQL option and then provide the hostname and port of the server, the database name, and authentication details, if you followed the earlier example these would be:
Hostname – localhost Port – 3306 Database – hypersocket Username – hypersocket Password - hypersocket
Finishing this configuration will complete the installation and you will be able to start the Hypersocket service.
If you are having difficult with the Installer, or do not wish run it you can also manually change the configuration files to set the database in use. After installation completes and before the service is started you will need to go to the Hypersocket conf directory. Open the database.properties file as root in order to edit the content.
Delete the existing contents of the file and enter the following replacing the 5 variable entries with the relevant details for the MySQL server,
jdbc.driver.className=org.postgresql.Driver jdbc.url=jdbc:postgresql://${installer:databaseHost}:${installer:databasePort}/${installer:databaseName} jdbc.username=${installer:databaseUser} jdbc.password=${installer:databasePassword} jdbc.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
The file will contain a number of placeholder values that need to be updated, each of these entries will need to be changed to use the actual details of the SQL database that Hypersocket will connect to:
If you used the earlier example then the text should now look like this:
jdbc.driver.className=org.postgresql.Driver jdbc.url=jdbc:postgresql://localhost:3306/hypersocket jdbc.username=hypersocket jdbc.password=hypersocket jdbc.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
Save the changes to the file and start the service, Hypersocket should now begin using the MySQL database.