1

Getting this error in the logs:

2015-04-13T06:22:52+00:00 ERR (3): Warning: PDO::__construct() [pdo.--construct]: [2002] Connection refused (trying to connect via tcp://mysqlv112:3306) in /data/14/1/150/111/1313763/user/1407123/htdocs/lib/Zend/Db/Adapter/Pdo/Abstract.php on line 129

Can I just create the table in the Database Admin to resolve this issue? What fields are in the tables for visitor_log and visitor_log_info? Please help!

Is this what I add to the log_visitor table? database admin create table

  • in table magento is save customer url ,customer visited url list – Amit Bera Apr 14 '15 at 6:18
  • is this for the table visitor_log? – dylanspeetz Apr 14 '15 at 6:24
  • That error says MySQL is down. First start it back up. – Melvyn Apr 14 '15 at 6:29
  • How do I start up MySQL? Sorry I am a noob web developer – dylanspeetz Apr 14 '15 at 6:37
  • On the server commandline try either service mysqld restart or check the /etc/init.d/ directory for a MySQL startup script – Sander Mangel Apr 14 '15 at 6:39
1

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';
  • Awesome! Website is up and running again ~ Thank you very much! – dylanspeetz Apr 14 '15 at 6:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.