View Full Version : Need help with db-configuration
Deadmeat
04-11-2006, 13:56
Hello, I'm having a bit of a problem, I search the forum and checked the download without any success. I edited the dbconfig.php-file and added a new user and password, and added added a database to my mysql-server. The login works fine. Then I checked the zabbix-folders for a "create tables"-script, but I didn't find anything.
The manual contains an explanation of the database structure, but before I begin to add all those tables manually, is there ant create-script available? I didn't found any. But a debian forum thread I found on google meantioned it, but I didn't find it. So, please help :)
Sincerencly,
Linus Waerner, Sweden
dantheman
06-11-2006, 16:00
From the documentation, under installing Zabbix Server... If you already created the database you can skip the first three lines. This also assumes you start in the main folder of the zabbix download I believe.
3. Create the ZABBIX database. ZABBIX comes with SQL scripts used to create the required database schema and also to insert a default configuration. There are separate scripts for MySQL and PostgreSQL.
For MySQL:
shell> mysql -u<username> -p<password>
mysql> create database zabbix;
mysql> quit;
shell> cd create/mysql
shell> cat schema.sql |mysql -u<username> -p<password> zabbix
shell> cd ../data
shell> cat data.sql |mysql -u<username> -p<password> zabbix
shell> cat images.sql |mysql -u<username> -p<password> zabbix
For PostgreSQL:
shell> psql -U <username>
psql> create database zabbix;
psql> \q
shell> cd create/postgresql
shell> cat schema.sql|psql -U <username> zabbix
shell> cd ../data
shell> cat data.sql|psql -U <username> zabbix
shell> cat images_pgsql.sql |psql -U <username> zabbix
I'm in the process of trying to install Zabbix and when I type cd create/mysql I get the error, "bash: cd: create/mysql: No such file or directory"
What am I doing wrong here?
predatorz
11-06-2007, 08:40
The documentation is wrong.
There is no directory create/mysql
It is create/schema/<use the file that is for your database>.
& create/data/<use the file that is for your database>.
Hope it helps you. :)