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 »
  • Installing CiviCRM »
  • WordPress Installations (Moderators: Kurund Jalmi, Coleman Watts) »
  • Moving Civi database from one host to another via PHPmyAdmin
Pages: [1]

Author Topic: Moving Civi database from one host to another via PHPmyAdmin  (Read 879 times)

databell

  • I post occasionally
  • **
  • Posts: 32
  • Karma: -1
  • CiviCRM version: 4.5
  • CMS version: WordPress 4.0.1
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.25
Moving Civi database from one host to another via PHPmyAdmin
December 16, 2014, 05:52:25 pm
Not sure if this belongs in this forum or the Upgrading Civi forum, but here goes...

I'm migrating a pre-existing DB from one hosting company to another. WordPress install. Exported the DB from the first host....no problem there. Then went to the new host, went to PHPmyAdmin, uploaded the DB and then this error came up:
--
Code: [Select]
Error

SQL query:

CREATE ALGORITHM = UNDEFINED DEFINER = `myUsername`@`localhost` SQL SECURITY DEFINER VIEW `civicrm_view_case_activity_recent` AS SELECT `ca`.`case_id` AS `case_id` , `a`.`id` AS `id` , `a`.`activity_date_time` AS `activity_date_time` , `a`.`status_id` AS `status_id` , `a`.`activity_type_id` AS `activity_type_id`
FROM (

`civicrm_case_activity` `ca`
JOIN `civicrm_activity` `a` ON ( (
`ca`.`activity_id` = `a`.`id`
) )
)
WHERE (
(
`a`.`activity_date_time` <= now( )
)
AND (
`a`.`activity_date_time` >= ( now( ) - INTERVAL 14
DAY )
)
AND (
`a`.`is_current_revision` =1
)
AND (
`a`.`is_deleted` =0
)
AND (
`a`.`status_id` <>1
)
);

MySQL said:

#1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation

I changed the username on top to myUsername for security purposes.

So why is this happening and is there some guide on how to properly import this?

haystack

  • I post occasionally
  • **
  • Posts: 61
  • Karma: 2
  • CiviCRM version: 4.n
  • CMS version: WordPress 4.n
  • MySQL version: 5.n
  • PHP version: 5.n
Re: Moving Civi database from one host to another via PHPmyAdmin
December 17, 2014, 01:35:06 am
You'll need to ask you new hosting company or sysadmin to grant your MySQL user the privileges mentioned.

databell

  • I post occasionally
  • **
  • Posts: 32
  • Karma: -1
  • CiviCRM version: 4.5
  • CMS version: WordPress 4.0.1
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.25
Re: Moving Civi database from one host to another via PHPmyAdmin
December 20, 2014, 11:25:47 am
I did. And unfortunately, the response I got back was 'Unfortunately, the way cPanel works we wouldn't be able to assign additional privileges beyond what is listed on the grant user privileges in your cPanel.'

Great.

Now how am I going to be able to import this database over?

joanne

  • Administrator
  • Ask me questions
  • *****
  • Posts: 852
  • Karma: 83
  • CiviCRM version: 4.4.16
  • CMS version: Drupal 7
Re: Moving Civi database from one host to another via PHPmyAdmin
December 20, 2014, 03:23:55 pm
Sorry, but you need to find a new hosting company that will give you all the privileges that you need.

The civicrm listing of hosting provider partners can be found at https://civicrm.org/providers/hosting .

If you don't want to use someone on that list then you need to make sure the hosting provider you choose will grant all the privileges you need.   Make sure you specifically check that you will be given  TRIGGER, CREATE ROUTINE  and ALTER ROUTINE.


databell

  • I post occasionally
  • **
  • Posts: 32
  • Karma: -1
  • CiviCRM version: 4.5
  • CMS version: WordPress 4.0.1
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.25
Re: Moving Civi database from one host to another via PHPmyAdmin
December 22, 2014, 06:41:17 pm
They do offer that.

Guy Iaccarino

  • I post occasionally
  • **
  • Posts: 92
  • Karma: 5
    • Greenleaf Advancement
  • CiviCRM version: 4.4.10, 4.5.4
  • CMS version: WordPress 4, Drupal 7, Drupal 6, Joomla 3
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Moving Civi database from one host to another via PHPmyAdmin
December 22, 2014, 06:52:34 pm
How did you export the database from the first host?
Guy Iaccarino
www.greenleafadvancement.com

databell

  • I post occasionally
  • **
  • Posts: 32
  • Karma: -1
  • CiviCRM version: 4.5
  • CMS version: WordPress 4.0.1
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.25
Re: Moving Civi database from one host to another via PHPmyAdmin
December 23, 2014, 03:44:42 pm
I went to PHPmyAdmin, selected the DB to download, clicked Export, went to custom, selected all the tables but five: civicrm_acl_cache, civicrm_acl_contact_cache, civicrm_cache
,civicrm_domain and civicrm_group_contact_cache.Then I checked Disable foreign key checks and Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT statement and then hit GO.

That was right, wasn't it?

The info came from here: http://wiki.civicrm.org/confluence/display/CRMDOC/Alternate+Moving+the+database+using+phpMyAdmin

databell

  • I post occasionally
  • **
  • Posts: 32
  • Karma: -1
  • CiviCRM version: 4.5
  • CMS version: WordPress 4.0.1
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.25
Re: Moving Civi database from one host to another via PHPmyAdmin
December 23, 2014, 03:45:44 pm
One thing I did notice was that in the old DB, it’s split into Functions, Tables and Views and the new? More of a standard DB with nothing broken up. I’m thinking this may have something to do with it. But I'm not a MySQL expert.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Moving Civi database from one host to another via PHPmyAdmin
December 26, 2014, 03:42:37 am
You need the functions to be in the new DB. Using your approach above, I would suggest you:

1. Install CiviCRM on the new host into a fresh, empty database
2. Then import your MySQL dump

Since you are including DROP TABLE it should drop only what is being replaced, and leave all the other required items in place.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • WordPress Installations (Moderators: Kurund Jalmi, Coleman Watts) »
  • Moving Civi database from one host to another via PHPmyAdmin

This forum was archived on 2017-11-26.