Hii , am manjunath working as an Intern using Drupal for content management for my project. Drupal has MySql as database but i can i access any other database already exist. i want to use the other database from a server. is it possible ? how ... help ASAP

Comments

Sree’s picture

In settings.php file you can set your DB as you require.

-- Sree --
IRC Nick: sreeveturi

d6-nerd’s picture

Can you mention the entire path of the file settings.php u mentioned in drupal

Sree’s picture

yoursitedir/sites/default/settings.php

-- Sree --
IRC Nick: sreeveturi

d6-nerd’s picture

Can you please tell me where the password ( is stored , ofcourse - encrypted ) for user name and database name mentioned in the settings.php file. Iam curious to know that

Sree’s picture

they are your DB USERNAME & PASSWORD rt/

I didnt get your question ...

-- Sree --
IRC Nick: sreeveturi

rishav’s picture

Check setting.php for $db_url

its stored in this format

$db_url = 'mysql://username:password@localhost/databasename';

d6-nerd’s picture

Can I connect to another database ( newly created ) simultaneously at the same time for working in a new module created along with the default database created at time of drupal install by default.
If drupal supports ( i hope - yes ) and for working properly, where the settings to be made, what are the changes to be made ( setting.php or any other files ) .
ie for my new db named databasename1 to be added , what are the changes to be made.

Thanks

rishav’s picture

I guess, it usually is a bad idea to use multiple databases for a single app, so I would suggest you use the database you have installed drupal in.

If you still want to use a separate database for particular module, u can create it and connect to it using separate mysql_select_db function, I am not

entirely sure about this, but u can try it out, and we can know for sure :)

navnim’s picture

naveen
hi i understand what u asked
i advise you to go to this site for full details
http://nextil.blogspot.com

naveen

Geetha’s picture

I want to connect my drupal page with mysql database.please help me i am new to drupal and mysql

sandeep.chaurasia’s picture

i want answer

david25’s picture

I think this has been answered in the posts above .. check the link that has been provided by another user.

patrick101’s picture

Yes .. rishav answered it above.