cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a second database?

jimbly2
Member

Hi - I have created a database using DB manager and it appears in phpMyAdmin and works fine. I now want to create a second database - again created in DB manager fine, but won't appear in phpMyAdmin?

 

I wondered if you had to  have a separate user for each database, so tried that, but then can't get second user to show in phpMyAdmin??

10 REPLIES 10

jimbly2
Member
bump

dave
Guru
You need to make sure both databases are under the same user first. Then you need to edit the phpmyadmin configuration string... I will get back to you on that.

dave
Guru

OK, the following will only work if both databases are created under the same user, so please make sure they are. Also it is a good idea to make a backup copy of the file before you edit it.

 

If you've not already done so, install phpmyadmin and select any of the databases belonging to that user.

 

Once installed, you need to edit the file /private/phpmyadmin/config.inc.php

 

Find the line that looks like:

 

$cfg['Servers'][$i]['only_db'] = 'dbname\_yourdomain\_com';

 

change it to:

 

$cfg['Servers'][$i]['only_db'] = array('dbname\_yourdomaini\_com', 'dbname2\_yourdomain\_com');

 

Substitute the obvious parts for your actual database names

Message Edited by dave on 14-09-2009 07:43 PM
Message Edited by dave on 17-09-2009 04:33 PM

jimbly2
Member
Cool - thanks Dave - will give it a go tomorrow 🙂

jimbly2
Member
Didn't work 😞

dave
Guru

You will need to open a new browser window before it displays both databases.

 

If that doesn't work you have possibly got the syntax slightly wrong. Please can you post the full line that I mentioned and I will check the syntax.

Message Edited by dave on 17-09-2009 12:25 PM

jimbly2
Member

Hi Dave,

 

ok - the line i have is:

 

$cfg['Servers'][$i]['only_db'] = array('corpevents\_corporate-events\_co\_uk', 'corp_members\_corporate-events\_co\_uk') ;

 

..thanks,

jim

dave
Guru

try:

 

 

$cfg['Servers'][$i]['only_db'] = array('corpevents\_corporate-events\_co\_uk', 'corp\_members\_corporate-events\_co\_uk');

 

Danny_Wobble
Member

Hi Dave,

 

I'm having exactly the same issue as jimbly2. I need to make the changes to the config.php file you mention.

 

My problem is that I can't access the file in Dreamweave or Filezilla in order to edit the file. I also can't get to the file through the BT Advanced File manager either.

 

Could you please help me to find a way to edit that file? Also strangley in Filezilla the phpmyadmin directory turns up as a black icon instand of the standard folder/directory icon. Any dea why this might be?

 

The black icon seems to be a result of why I can't get into the phpmyadmin directory to view the config.inc.php file.

 

Many thanks,

 

Daniel.