Author Topic: Database Error: 1046 No Database Selected  (Read 5349 times)

0 Members and 1 Guest are viewing this topic.

Offline Prashant

  • Newbie
  • *
  • Posts: 10
    • View Profile
Database Error: 1046 No Database Selected
« on: March 17, 2006, 01:20:37 PM »
Hi everyone,
I have this error message showing up at the bottom of the main page on the first 4images page that should open : index.php

*****

Database Error

MySQL Error : Database Error
Error Number: 1046 No Database Selected
Date        : Fri, March 17, 2006 07:08:33
IP          : 202.161.131.67
Browser     : Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7
Referer     :
PHP Version : 4.4.2
OS          : Linux
Server      : Apache/1.3.34 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.2 FrontPage/5.0.2.2635 mod_ssl/2.8.25 OpenSSL/0.9.7d
Server Name : www.merofoto.com
Script Name : /main/index.php

*****

I had not done anything with the database before this problem. My host did write: have just recently upgraded the php version in the server were upgraded on March 16 to php version 4.4.2.
Could the problem be because of the php version ? How do I correct this.
BTW, when browsing through the forum for a soution to the above mentioned problems I did do all the latest patch for the version 1.7.1 ... (files have been changed since the problem started)

HELP !!!

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Database Error: 1046 No Database Selected
« Reply #1 on: March 17, 2006, 03:02:39 PM »
check config.php
Quote
Error Number: 1046 No Database Selected
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Prashant

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Database Error: 1046 No Database Selected
« Reply #2 on: March 20, 2006, 10:20:44 AM »
Hey V@no, thank you for the reply.
Everything was allright in the config.php, I even tried with different user name for the database and various privileges, everything worked (Errors and non errors) out allright.
Am (trying) to check all the other related pages but its taking me ages.
Got any more suggestions ? Appreciate much.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Database Error: 1046 No Database Selected
« Reply #3 on: March 20, 2006, 02:37:26 PM »
Got any more suggestions ? Appreciate much.
Pick one:
1) the name of the database is not matching with the name in config.php
2) user/pass is wrong for that particular server/database
3) something wrong with your mysql server

That's all what could possible cause this.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Prashant

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Database Error: 1046 No Database Selected
« Reply #4 on: March 21, 2006, 07:49:49 AM »
Thank you again V@no !!
1] The password and the name of the database matches.
2] User password is also all right
3] Did contact the hosting servicee but they claim nothing is wrong with the mysql server

The part in the main page where, the new images are to be seen is where the database is showing errors. It works allright when the 'New Images' is clicked from the top of the page. Doesnt this mean something is wrong with the page rather than the database ? The rest of the 4images pages are all working great, its just the first page which is working 'half'(?).
The url for reference is www.merofoto.com
Thank you for the patience V@no !!!

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Database Error: 1046 No Database Selected
« Reply #5 on: March 21, 2006, 03:04:50 PM »
so, then it sounds like mysql server crashing...
What is your MySQL server's version?

Did you change anything in index.php?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Prashant

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Database Error: 1046 No Database Selected
« Reply #6 on: March 24, 2006, 01:16:02 PM »
Thank you v@no for your reply.
Yep, my home.html page had gone wrong, I mean I changed it to the original file that we get in the 4images pack...
But why would a page suddenly stop working wrong ?
My host did upgrade the php server to 4.4.2 and that is when the problem started...