MySQL Error: Could not select the database

Hello! I'm trying to install zenphoto.
I have this error, look thruogh this forum, change config.php --> zp_config.php, chech path... I still have this error. Just before I have a login window (I suppose to zenphoto innstallation).
Please help me. I have no ideas, and no experience with things like this.

ps. The second part of error says: "Check the config.php file to make sure you've got the right username, password, host, and database. If you haven't created the database yet, now would be a good time".
How can I check if I have the database? (My hoster provide me with all "username, password, host, and database", so I suppose I have it... but, who knows)

Comments

  • I have the same errors and also I done the thing of zp-config, but I still have this error.

    I try with diferents DB's but always is the same "MySQL Error: Could not connect to the database server."

    Any idea how fix this.
  • knn Member
    Hello.
    For my case it was wery easy - problem were in the hoster's settings they send to me. After they fix it, all installetion runs perfectly!!!!
    I use the simple script I found in the web to find the problem. (In fact in ZenPhoto connection to DB makes in one step, and in this pample in two. So I was able to find the problem (DB name in my case))

    <?php $link = mysql_connect('localhost', 'DB_user', 'password') or die('Could not connect: ' . mysql_error()); echo 'Connected successfully'; mysql_select_db('DB_name') or die('Could not select database'); mysql_close($link); ?>
  • thanks a lot Knn

    I run the little script and all its Ok, maybe I just mix names user, pass or database names when a try to install yesterday, but today its ok, I have my own gallery powered byZenPhoto

    Now I have to found how use it with Wordpress

    sorry for my english its no good :P
  • knn Member
    And I have a question. As I feel myself a little bit stupid)) All guys here talks about wordpress, and I don't know what is it... So please explain me what is it.
  • what is wordpress? its a CMS content magnament system, that is used for blogs. Yo can get more information in the website of wordpress (www.wordpress.org)
  • Sorry about my silly question but i have the same problem.
    How do i run that script and should i just copy and paste it?
    But where?
    Thanks for your eventual replyes
Sign In or Register to comment.