These instructions assume CiviCRM and Drupal are on separate databases located on the same physical host, and that the same database user has access to both the CiviCRM and Drupal databases.
- Before making any changes, it is strongly advised that you make backups of your mysql databases and settings.php file.
- Make sure you are logged into your Drupal site as the administrator.
- Visit http://yourdomain.com/civicrm/admin/setting/uf?reset=1 Replace
with the domain of your Drupal site/installation. - You should see a page with output that begins with: "$databases['default']['default']['prefix']= array("
- Copy everything inside this box, including the trailing ");"
- Open /sites/default/settings.php for editing from the root directory of the site, typically "public_html" on most servers. (NOTE: This assumes you have a single site installation. The location of the settings file might be different depending on whether or not you have multiple sites)
- Find the database connector array. This is where Drupal stores the information regarding the MySQL database and the necessary credentials to connect to it. The array beings with " $databases = array ( " then goes on to include the location and MySQL credentials, as well as additional options.
- Paste the output from step 3 here. Be sure to paste it AFTER the trailing ");"
- Save the file. You might want to clear your site cache at this point.
- You should now be able to create views based on CiviCRM data.
$databases['default']['default']['prefix'] = array(
'default' => 'default_',
For More Information Click Here .
Above steps is working for Drupal 7.
To do db_prefix in Drupal 6 : No need to add extra line.
Add The code which on the link below:
Comments
Post a Comment