The error you're getting thates that PDO can't connect to the MySQL server. Are you sure you've set the right credentials? You can find them in app/etc/local.xml
For the tables, the following query will create the log_visitor
and log_visitor_info
tables.
CREATE TABLE IF NOT EXISTS `log_visitor` (
`visitor_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Visitor ID',
`session_id` varchar(64) DEFAULT NULL COMMENT 'Session ID',
`first_visit_at` timestamp NULL DEFAULT NULL COMMENT 'First Visit Time',
`last_visit_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Last Visit Time',
`last_url_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Last URL ID',
`store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
PRIMARY KEY (`visitor_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Log Visitors Table' AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS `log_visitor_info` (
`visitor_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Visitor ID',
`http_referer` varchar(255) DEFAULT NULL COMMENT 'HTTP Referrer',
`http_user_agent` varchar(255) DEFAULT NULL COMMENT 'HTTP User-Agent',
`http_accept_charset` varchar(255) DEFAULT NULL COMMENT 'HTTP Accept-Charset',
`http_accept_language` varchar(255) DEFAULT NULL COMMENT 'HTTP Accept-Language',
`server_addr` bigint(20) DEFAULT NULL COMMENT 'Server Address',
`remote_addr` bigint(20) DEFAULT NULL COMMENT 'Remote Address',
PRIMARY KEY (`visitor_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Log Visitor Info Table';
service mysqld restart
or check the/etc/init.d/
directory for a MySQL startup script