Drupal and mysql workbech

abdelrahman's picture

How can I make the drupal connect with other database on mysql workbench , I need to create new module or what?

Comments

setup a database connection in MySQL Workbench

ricardojmartins's picture

@abdelrahman 1. open mysql workench, and add the mysql connection in the home window or or go to the database menu and click manage connections, here you can add a new one.

2. to setup a new connection in mysql workbench use the information of your drupal setup available in your /sites/default/settings.php file, the database array, e.g:

$databases = array (
  'default' =>
  array (
    'default' =>
    array (
      'database' => 'database_name', // your database name
      'username' => 'root_user', // your database user
      'password' => 'password', // the database user password
      'host' => 'localhost', // leave this as default 'localhost'
      'port' => '',
      'driver' => 'mysql',
      'prefix' => '',
    ),
  ),
);

Ricardo Pinto
Web developer

Community Media

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: