Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Resolve the psa session table issue.  (Read 3274 times)

0 Members and 1 Guest are viewing this topic.

sajay

  • Guest
Resolve the psa session table issue.
« on: December 07, 2014, 03:53:42 pm »
 Run the above command to resolve the psa session table issue.

   mysql -u admin -p$(cat /etc/psa/.psa.shadow)

   mysql> use psa;

   mysql> show databases;

   mysql> CREATE TABLE `sessions` ( `sess_id` varchar(33) character set
   ascii collate ascii_bin NOT NULL default '', `type` smallint(5)
   unsigned NOT NULL default '0', `login` varchar(255) character set utf8
   NOT NULL default '', `ip_address` varchar(15) character set ascii NOT
   NULL default '', `login_time` datetime NOT NULL default '0000-00-00
   00:00:00', `click_time` timestamp NOT NULL default CURRENT_TIMESTAMP on
   update CURRENT_TIMESTAMP, PRIMARY KEY (`sess_id`) ) ENGINE=InnoDB
   DEFAULT CHARSET=latin1;

   mysql> \q

   If above query gives following error message

   ~~~~~~~~~~~~~~~~~~~

   ERROR 2006 (HY000): MySQL server has gone away

   No connection. Trying to reconnect...

   ~~~~~~~~~~~~~~~~~~~

   Or

   ~~~~~~~~~~~~~~~~~~

   ERROR 1064 (42000): You have an error in your SQL syntax; check the
   manual that corresponds to your MySQL server version for the right
   syntax to use near 'TYPE=INNODB' at line 8

   ~~~~~~~~~~~~~~~~~~

   Then logout from mysql prompt and simple follow the steps.

   mv /etc/my.cnf /etc/my.cnf-ori

   touch /etc/my.cnf

   Restart the mysql service