Problem with connection to mysql data base

Everything which is related to the installation of phpLogCon.

Problem with connection to mysql data base

Postby heinzelrumpel » Tue Jun 30, 2009 2:23 pm

Hi,

I use syslogd-ng on my server with mysql-logging. Databasename is "syslog" and the table name is "logs". I creates the table in mysql as describes under http://www.vermeer.org/docs/1

CREATE TABLE logs (
host varchar(32) default NULL,
facility varchar(10) default NULL,
priority varchar(10) default NULL,
level varchar(10) default NULL,
tag varchar(10) default NULL,
date date default NULL,
time time default NULL,
program varchar(15) default NULL,
msg text,
seq int(10) unsigned NOT NULL auto_increment,
PRIMARY KEY (seq),
KEY host (host),
KEY seq (seq),
KEY program (program),
KEY time (time),
KEY date (date),
KEY priority (priority),
KEY facility (facility)
) TYPE=MyISAM;


My mysql-table now looks like this

Code: Select all
mysql> describe logs;
+----------+------------------+------+-----+---------+----------------+
| Field    | Type             | Null | Key | Default | Extra          |
+----------+------------------+------+-----+---------+----------------+
| host     | varchar(32)      | YES  | MUL | NULL    |                |
| facility | varchar(10)      | YES  | MUL | NULL    |                |
| priority | varchar(10)      | YES  | MUL | NULL    |                |
| level    | varchar(10)      | YES  |     | NULL    |                |
| tag      | varchar(10)      | YES  |     | NULL    |                |
| date     | date             | YES  | MUL | NULL    |                |
| time     | time             | YES  | MUL | NULL    |                |
| program  | varchar(15)      | YES  | MUL | NULL    |                |
| msg      | text             | YES  |     | NULL    |                |
| seq      | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
+----------+------------------+------+-----+---------+----------------+
10 rows in set (0.04 sec)


After I set up phplogcon (latest stable version) I get this error


Code: Select all
Es wurden keine syslog-Einträge gefunden. - Error Details:
Could not find the configured table, maybe misspelled or the tablenames are case sensitive


The relevant section of config.php looks like this

Code: Select all
$CFG['DefaultSourceID'] = 'Source1';

$CFG['Sources']['Source1']['ID'] = 'Source1';
$CFG['Sources']['Source1']['Name'] = 'My Syslog Source';
$CFG['Sources']['Source1']['ViewID'] = 'SYSLOG';
$CFG['Sources']['Source1']['SourceType'] = SOURCE_PDO;
$CFG['Sources']['Source1']['DBTableType'] = 'monitorware';
$CFG['Sources']['Source1']['DBType'] = DB_MYSQL;
$CFG['Sources']['Source1']['DBServer'] = 'localhost';
$CFG['Sources']['Source1']['DBName'] = 'syslog';
$CFG['Sources']['Source1']['DBUser'] = 'root';
$CFG['Sources']['Source1']['DBPassword'] = 'xxxxxx';
$CFG['Sources']['Source1']['DBTableName'] = 'logs';
$CFG['Sources']['Source1']['DBEnableRowCounting'] = true;


Even if i change "dbtabletype" from monitorware to syslogng it does not work. My table logs is filled with logs, so from that side everything looks ok. Permissions of root on database syslog and table logs are checked.

What else could be the problem?

Regards, heinzelrumpel
heinzelrumpel
New
 
Posts: 2
Joined: Tue Jun 30, 2009 2:14 pm

phpLogCon professional services

  • Custom phpLogCon configuration?
  • Maintenance Contract?
  • Installation support?

Re: Problem with connection to mysql data base

Postby heinzelrumpel » Wed Jul 01, 2009 10:00 am

o.k. I fixed that problem with the beta version and custom dbmappings. nevertheless I only get date and no time, because phplogcon ist using date_time field. is there a possibility that this is being changed to 2 seperate fields in future versions? how would I be able to tell syslog-ng to put date an time in one field? how would I have to change field attributes in mysql to achieve this?
heinzelrumpel
New
 
Posts: 2
Joined: Tue Jun 30, 2009 2:14 pm

Re: Problem with connection to mysql data base

Postby alorbach » Wed Jul 01, 2009 10:18 am

Hi,

currently it is only possible to use one database field for date and time in phpLogCon only.
It would be very difficult to implement two fields, because phpLogCon is based on using only one field for the date & time.

best regards,
Andre Lorbach
User avatar
alorbach
Site Admin
 
Posts: 1129
Joined: Thu Feb 13, 2003 11:55 am

Google Ads



Return to Installation

Who is online

Users browsing this forum: No registered users and 0 guests

cron