HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Error With Database

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#36752 (In Topic #8291)

Non-joined user

Not sure why, but I keep getting this error between step 4 and 5:



ocPortal error

Could not connect to database (Unknown database 'junta')

Details here are intended for the website/system-administrator, not for regular website users. If you are a regular website user, please let the website staff deal with this problem.

Depending on the error, you may need to edit the base configuration (the info.php file).

ocProducts maintains full documentation for all procedures and tools. These may be found on the ocPortal website. If you are unable to easily solve this problem, we may be contacted from our website and can help resolve it for you.

Back to the top
 
Posted
Rating:
#36754
Avatar

Community saint

are you using cpanel?
you may need to makre sure you are typing in the database name correctly.
If you have cpanel it will be like this.
username_junta

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#36756
Avatar

Yeah, what Ami's saying is that cpanel-created database always get prefixed… so the name you type in is only a fragment of the actual database name.

However, there may be a more basic issue- have you created your database? The installer doesn't create the database, it installs to an existing database that you tell it about.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#36766

Non-joined user

hmmm, what is cpanel?  All i know is that I'm running the install.php directly from my website… I did try what you suggested but it didn't work, I received the same error.  Here is my information as it appears on my webhost's account (by the way, I did create a database before doing all this):

name:  junta (this is the database name I'm assuming)

DSN (or "hostname"):  junta.db (it says to never use "localhost"

Default admin username:  newprussia

When i enter in the ocportal settings it seems to be accepting the fields i enter for database host, database username, and even database password, but the error seems to be coming from the first field, which is database name.

Back to the top
 
Posted
Rating:
#36774
Avatar

cpanel is one of a handful of popular systems installed by webhosts to allow their customers (i.e. people like you) to manage the hosting. We call them 'web hosting control panels'. So cpanel is one, Plesk is another, Ensim is another. Sometimes webhosts pretend they wrote the system and brand it as their own, but in most cases it is actually one of these popular systems.

Anyway, this might be related to this cpanel naming thing Ami said.

However, it also could be the server name was given wrong, because if it was connecting to the wrong database server it stands to reason your database wouldn't be on it, thus the error. If you followed their advice though, that shouldn't be the case.

If you're still stuck it might be a good idea to ask your webhost if the details you're putting in are correct and give them the error you see.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#36860
Avatar

Community saint

Hi Ami and Chris,

I am attempting a new install of the newest version, and am experiencing the same error message. I just initiated a new vps account and lost the old site.

When I checked the info.php file to see if it needed modification I discovered that it is empty.

Sorry for asking for help on this again, but it was a year ago when I last encountered this problem…first install.

BTW, the prefix and underscore are correct, so is everything else…just checked the MySQL db to be sure.

Any help would be greatly appreciated.
Back to the top
 
Posted
Rating:
#36862
Avatar

Community saint

Hi Fletch!
Back to the top
 
Posted
Rating:
#36868
Avatar

Community saint

Hi psydoc.

How can I help?

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#36870
Avatar

Community saint

I lost my old installation of my site when I changed web hosts, so I was trying a clean install of 3.2.6. I keep getting the same error that is the issue of this thread. I checked and the info.php file is empty. I have no idea what configuration info, or format that should be there.

I have checked the db information closely and it is correct, so the error has to be someplace else. I can't figure out what I am doing wrong.

BTW, how is everything going at your site. I dropped by to take a look about a month ago…very impressive!!! :thumbs:
Back to the top
 
Posted
Rating:
#36871
Avatar

Community saint

 I also went through the installation tutorial and checked all the permissions…I think that I set them all correctly. info.php is set for 666, even though the 644 should work on my unix platform.

If this helps, my Apache version is 2.2.6, my php is 5.2.4, and the MySQL is 5.0.27.


Last edit: by psydoc
Back to the top
 
Posted
Rating:
#36881
Avatar

Hi,

The installer will try to connect to the database before it writes out the config file. The config file is intentionally created as blank by an earlier step. So we can be certain this isn't a permission or config file issue.

I've traced through the installation code and the error you're seeing (unknown database) is verbatim from mySQL. I'd double check you're trying to connect to the correct mySQL server, and also that the database name given is accurate (no missing prefixes etc).

Another more possibility not mentioned in this topic so far is that your server could have a bit of schizophrenia. When you specify 'localhost' to connect to mySQL, the connection is made via the 'socket file'; whilst if you specify the IP address of your own machine, it'll connect via a TCP/IP socket. It is possible your machine could have two mySQL's installed on it, and you might need to give the IP address to get the right one.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#36887
Avatar

Community saint

Thanks for the reply, Chris!!!

I did think that the config file was intentionally blank, but I wondered if maybe it could be modified to skip this step?

That is a good idea…to check if I am trying to connect to the correct database. The prefix is exact and the spelling is also correct; but, as this is a new host, I can't be sure about the existence of more than one…I do know that the config on this server allows for php 4 or 5. Maybe it also allows for local or remote sql. I will open a ticket at the host.

When you mention the IP, is that in place of "localhost"? I think I follow, but I have never used the config this host uses. I always kept it simple with my servers.
Back to the top
 
Posted
Rating:
#36888
Avatar

Community saint

Thanks for the comment on the site, psydoc.

I think your problem is best left within Chris' remit, but I shall keep up with the posts.

Interested.

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#36890
Avatar

Community saint

 Thanks, Fletch! I am interested in a few of your charities. Could you PM me and let me know which you think is most deserving of a contribution?

I wish I had the means to contribute to them all, but alas, I don't have that much in the way of discretionary funds. :(
Back to the top
 
Posted
Rating:
#36894
Avatar

Community saint

Thanks, Terry…I found the button and just made a 50 USD donation. I do hope that my meager donation can do some good.

I carry several pairs of gloves and a winter coat to give to people every winter. The small amount of good I can do is always returned many times over in just knowing that I was able to help someone worse off than I.

Bless you and yours!

Keith

Have a good night!
Back to the top
 
Posted
Rating:
#36909
Avatar

Community saint

Thanks Keith.

At the risk of repeating myself, that is an amazingly generous donation, especially for folks you don't know, nor have any connection to.

But they're 'needy' folks, and I am sure many blessings will be coming your way on Christmas Day.

Be Happy!

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: