By manjumca17 on
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
set DB details in settings.php file ....
In settings.php file you can set your DB as you require.
-- Sree --
IRC Nick: sreeveturi
path of settings.php
Can you mention the entire path of the file settings.php u mentioned in drupal
...
yoursitedir/sites/default/settings.php
-- Sree --
IRC Nick: sreeveturi
password for db storage
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
DB ....
they are your DB USERNAME & PASSWORD rt/
I didnt get your question ...
-- Sree --
IRC Nick: sreeveturi
Check setting.php for $db_url...
Check setting.php for $db_url
its stored in this format
$db_url = 'mysql://username:password@localhost/databasename';
connecting to another database simultaneously at the same time
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
I guess, it usually is a bad
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 :)