rssHomeContactSite Map

External Database configuration

For evaluation purposes Advanced Web Stats works very well on the pre-configured database, Hypersonic. But for production use it is strongly recommended the configuration of an external database.

[Warning]Warning

We do not recommend the use of Hypersonic database for production purposes!

After evaluating Advanced Web Stats and staring to use the application to effectively analyze your website you should configure the application to use an external database.

This is required because external databases provide more speed, security and peace of mind. Due to sudden power loss, database corruption or unrecoverable errors may occur.

The following instructions will help you to successfully configure an external database for Advanced Web Stats to use.

From [Profile Manager] go to [Settings] and select the [Database Settings] menu. At this moment the database engine used is Hypersonic. To change the default database engine select an external database from the drop down list and follow the instructions outlined below.

[Important]Important

Before making these settings you need create a database and an user with all privileges granted on this database. You will need these details to use in the forms below.

Create and configure MySQL database

To create a MySQL database and an user with all privileges granted to this database follow the instructions below.

First you need to download and install a stable version of MySQL from the MySQL website. Then use the mysql client to connect to the server as the MySQL root user:

shell> mysql -u root -p 

When you are connected to the server, use the following commands to create the [aws] database and the [aws] user, which will have granted all privileges to the database. Please note that you need to create the database with binary UTF-8 collation:

mysql> CREATE DATABASE aws CHARACTER SET utf8 COLLATE utf8_bin;
mysql> CREATE USER 'aws'@'localhost' IDENTIFIED BY 'aws';
mysql> GRANT ALL PRIVILEGES ON aws.* TO 'aws'@'localhost';
mysql> FLUSH PRIVILEGES;           

The above instructions create a user 'aws' with the password 'aws' that can access the mysql database 'aws' from the localhost.

[Important]Important

If you install AWS on a different machine than the one that runs the mysql server, you need to replace the 'localhost' above with that computer name or IP address, or with '%' if you wish to connect from any host.

You will also need to set the MySQL server character encoding to UTF-8. To do this edit the MySQL configuration file:

  • [my.ini] for windows

  • [my.conf] for Linux and Mac OS X

The character set has to be declared in the Server section, which is the section after [mysqld]:

[mysqld]
default-character-set=utf8      

To test your new settings use the following commands:

 mysql> USE aws;
 mysql> STATUS;

When the MySQL database is created you need to configure Advanced Web Stats to use the external MySQL database, by entering the following database and user settings:

  • Server name - The name of the server where the database is hosted. It can be localhost if the database is hosted on the same computer or the IP address of the host.

  • Port number - For MySQL the default port is: 3306.

  • Database name - The name of the database that Advanced Web Stats will use. Unless it already exists, it will need to be created.

  • User name - The user with all privileges granted on the respective database.

  • Password - The password used by the user to connect to the database.

Below you can find an example of how the configuration of MySQL should look like.

Create and configure PostgreSQL database

Before configuring Advanced Web Stats to use PostgreSQL database engine it is required to create a database and an user with all privileges granted for that database.

The first step is to download a stable version of PostgreSQL and install it on your machine. Then use the following instructions to create the database [aws] and the user [aws]:

psql -U postgres -W   

postgres=# CREATE DATABASE aws WITH ENCODING 'UNICODE';
postgres=# CREATE USER aws WITH PASSWORD 'aws';
postgres=# GRANT ALL PRIVILEGES ON DATABASE aws to aws;

When the database and user are created you need to configure Advanced Web Stats for PostgreSQL.

The configuration of Advanced Web Stats for PostgreSQL is similar with the one for MySQL. You need to enter the following database and user settings:

  • Server name - The name of the server where the database is hosted. It can be localhost if the database is hosted on the same computer or the IP address of the host.

  • Port number - For PostgreSQL the default port is: 5432.

  • Database name - The name of the database that Advanced Web Stats will use. Unless it already exists, it will need to be created.

  • User name - The user with all privileges granted on the respective database.

  • Password - The password used by the user to connect to the database.

Below you can find an example of how the configuration of PostgreSQL should look like.

Create and configure MS SQL Server database

For MS SQL Server you can use many tools and one of them is Microsoft SQL Server Management Studio. Before starting the configuration in Advanced Web Stats you need to create a new user and database for Advanced Web Stats to use.

On the computer that is running the MS SQL Server, start the SQL Server Management Studio. Once you login open a 'New query' and run the following commands:

create database aws; 

create login aws with password = 'aws'; 
use aws; 
create user aws for login aws; 
grant control to aws; 
grant view definition to aws; 
grant select to aws;

Once the database is created you need to configure Advanced Web Stats for MS SQL Server.

The configuration of Advanced Web Stats for MS SQL Server is similar with the one for MySQL and PostgreSQL. You need to enter the following database and user settings:

  • Server name - The name of the server where the database is hosted. It can be localhost if the database is hosted on the same computer or the IP address of the host.

  • Port number - For MS SQL Server the default port is: 1433.

  • Database name - The name of the database that Advanced Web Stats will use. Unless it already exists, it will need to be created.

  • User name - The user with all privileges granted on the respective database.

  • Password - The password used by the user to connect to the database.

In the screen shot below you can find an example of how the configuration of the MS SQL Server should look like in Advanced Web Stats.