CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Delete all records from Drupal's session table (drupal.sessions)
Pages: [1]

Author Topic: Delete all records from Drupal's session table (drupal.sessions)  (Read 13364 times)

craigntammy

  • I’m new here
  • *
  • Posts: 16
  • Karma: 0
Delete all records from Drupal's session table (drupal.sessions)
August 19, 2007, 03:14:07 am
Just want to ask a question before I do the wrong thing....

Delete all records from Drupal's session table (drupal.sessions)

How do you do this?

I assume I can go to the sessions table in phpmyadmin click the check boxes next to...

uid
sid
hostname
timestamp    
cache    
session

and then click on empty in the menu

am I right or not  ???

just want to be sure

Thanks for your help
you guys rock
« Last Edit: August 19, 2007, 03:17:58 am by craigntammy »

twowheeler

  • I post occasionally
  • **
  • Posts: 115
  • Karma: 11
    • Harrisburg Christian Performing Arts Center
  • CiviCRM version: 4.3.4
  • CMS version: Drupal 7.22
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Delete all records from Drupal's session table (drupal.sessions)
August 19, 2007, 04:30:19 am
I don't think you need to click on the checkboxes next to the field names.  Once you have selected the sessions table, 'empty' should delete the records.  It will ask you to confirm before doing anything.

Personally I opened an SQL box and typed 'delete from sessions;' and that was it. 


craigntammy

  • I’m new here
  • *
  • Posts: 16
  • Karma: 0
Re: Delete all records from Drupal's session table (drupal.sessions)
August 19, 2007, 04:37:34 am
Thanks
it seemed to work



Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Delete all records from Drupal's session table (drupal.sessions)
August 19, 2007, 09:09:37 am
While DELETE does indeed work, it can take a bit of time on large tables.

TRUNCATE sessions; is the quickest MySQL way of emptying a given table (and this is what phpMyAdmin does when asked to empty a table).
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

hallman

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 10
Re: Delete all records from Drupal's session table (drupal.sessions)
August 22, 2007, 08:59:30 am
Could someone please add to the instructions at http://wiki.civicrm.org/confluence/display/CRMDOC/Upgrading+Drupal+Sites+from+v1.7+to+v1.8
the commands to delete the drupal session table?

I haven't learned much MySQL yet, but so far have been able to just put my username, password, and database name into the commands you provide.

I have command line access so I can execute commands like
shell > mysql -u civicrm_user -h civicrm_db_server -pcivicrm_password civicrm_db

and I can get into phpmyadmin, but I haven't done anything with it.

Judy Hallman
Judy Hallman

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Delete all records from Drupal's session table (drupal.sessions)
August 22, 2007, 09:44:05 am
1. shell > mysql -u drupal_user -h drupal_db_server -pdrupal_password drupal_db
2. mysql> use drupal_db; (just to make sure right db is used)
3. mysql> TRUNCATE TABLE sessions;

HTH

Kurund
Found this reply helpful? Support CiviCRM

craigntammy

  • I’m new here
  • *
  • Posts: 16
  • Karma: 0
Re: Delete all records from Drupal's session table (drupal.sessions)
August 22, 2007, 09:54:11 am
Quote from: hallman on August 22, 2007, 08:59:30 am
Could someone please add to the instructions at http://wiki.civicrm.org/confluence/display/CRMDOC/Upgrading+Drupal+Sites+from+v1.7+to+v1.8
the commands to delete the drupal session table?

I haven't learned much MySQL yet, but so far have been able to just put my username, password, and database name into the commands you provide.

I have command line access so I can execute commands like
shell > mysql -u civicrm_user -h civicrm_db_server -pcivicrm_password civicrm_db

and I can get into phpmyadmin, but I haven't done anything with it.

Judy Hallman


I agree both command line and phpmyadmin instructions should be added

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Delete all records from Drupal's session table (drupal.sessions)
August 22, 2007, 10:15:05 am
Done. Updated docs:

http://wiki.civicrm.org/confluence/display/CRMDOC/Upgrading+Drupal+Sites+from+v1.7+to+v1.8#UpgradingDrupalSitesfromv1.7tov1.8-7.DeleteallrecordsfromDrupal%27ssessiontable%28drupal.sessions%29

Kurund
Found this reply helpful? Support CiviCRM

craigntammy

  • I’m new here
  • *
  • Posts: 16
  • Karma: 0
Re: Delete all records from Drupal's session table (drupal.sessions)
August 22, 2007, 10:17:20 am
Thanks for all you do!!!  ;D

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Delete all records from Drupal's session table (drupal.sessions)

This forum was archived on 2017-11-26.