MySQL connections with version 1.1.2

I've been helping a friend of mine to install ZP 1.1.2 but have run into a problem I can't seem to solve. For some reason ZP cannot successfully make a connection to the DB server. For reference, the host is GoDaddy. I checked all of the DB information multiple times. Made sure the db name, db username, db password, and changed the db host accordingly to the address GoDaddy says the db is located on. I can't seem to figure out why ZP cannot connect. I have version 1.1.2 installed just fine on my own server, but it's not hosted by GoDaddy. I was however successful in installed version 1.0.8.2 on GoDaddy. Does anyone have a clue as to what I can do to get version 1.1.2 working with GoDaddy?

Comments

  • Are you upgrading your 1.0.8.2 installation? If so you may be running into a problem with the 1.1.2 release. What is the error you are getting? If it has to do with the Options table, you should get the nightly build and try it.
  • This was a new install. When I would access the setup file I would get this error:

    MySQL Error: Zenphoto could not connect to the database server. Check your zp-config.php file for the correct host user name, and password. Note that you may need to change the host from localhost if your web server uses a separate MySQL server, which is common in large shared hosting environments like Dreamhost and GoDaddy. Also make sure the server is running, if you control it.

    I am certain I had the correct information in zp-config.php.
  • trisweb Administrator
    1) Does GoDaddy use a different port for MySQL? Zenphoto doesn't support this in the config file (it's extremely rare, and I doubt godaddy does this...)

    2) Can you look at a different application that uses the database to double-check?

    3) Does the user you're using have permission to access the database you've selected?

    4) Does GoDaddy prefix the database names with the username? THis is pretty common (eg: db "zenphotodb" is actually "username_zenphotodb"

    5) Do they prefix the usernames with the account user name? Eg: user "mysqluser" is actually "username_mysqluser". Both 4 and 5 are common at large hosts.

    6) Are you absolutely positively sure you have the correct info? There's very little going on in zenphoto to connect to the database -- if it's not working it's extremely likely that it's a configuration problem.

    It's interesting that 1.0.8.2 worked though... it should be exactly the same.
  • 1. GoDaddy's site doesn't say anything about the MySQL port.

    2. WordPress is installed with no problem. One thing that GoDaddy does is randomly assign a MySQL server to newly created databases. So the database server is not the same for ZP as it is for WordPress. Also you must create a new user for each new database, so the user is also different.

    3. I would imagine so. When I installed version 1.0.8.2, I used the same database information as I had for 1.1.2.

    4. and 5. This is one of the first things I had checked. The WordPress installation does not use a prefix for the database name or database username. I tried with and without a prefix. Neither made a difference.

    6. Considering I used the same database information from attempting to install 1.1.2 with 1.0.8.2, I am positive my information is correct. Unless GoDaddy is giving me the wrong host the database is on...

    I appreciate your help. I'll be suggesting that my friend gives GoDaddy a call and see what they say. It's like you said, it's interesting that the older version works, but not the newer version. In any case, 1.0.8.2 is working fine.
  • trisweb Administrator
    Yes.. in that case it might be a bug in Zenphoto handling the connection wrong somehow. Keep us posted. Thanks!
  • Hi, I'm also having the same problem. I'm installing the new version/release. This is new installation.

    Zenphoto Error

    MySQL Error: Zenphoto could not connect to the database server. Check your zp-config.php file for the correct host, user name, and password. Note that you may need to change the host from localhost if your web server uses a separate MySQL server, which is common in large shared hosting environments like Dreamhost and GoDaddy. Also make sure the server is running, if you control it.

    I'm using hostgator hosting.

    Please help, I really like this program.
  • lane:

    I am presuming you did check that you checked the zp-config file and have the correct information in the following lines:

    `$conf['mysql_user'] = "user";

    $conf['mysql_pass'] = "pass";

    $conf['mysql_host'] = "localhost"; // Won't need to change this 90% of the time.

    $conf['mysql_database'] = "database_name";`
  • I am having the same problem as sunkast. Although I am not upgrading, this is a fresh install and I have not used zp yet. However I am positive the connection info is correct. I also get the same error.
  • Using the same "mysql_host", "mysql_user" from zp-config.php, can you type in the following in a shell console?

    `mysql -h mysql_host -u mysql_user -p`

    Input "mysql_pass" when prompted.

    Are you connected? Type

    `show databases;`

    Do you see your database?
  • trisweb Administrator
    adidascchs -- triple-check your information. There's only one way that error can occur and that's if the database connection info is incorrect, so long as we know that PHP itself is configured correctly.

    Do you have any other web software running on your site? Wordpress or another program that uses the database? Check their configuration files for examples.

    If you don't have any other PHP programs using the database then it could be a server configuration problem, and you should ask your web host for support.
  • I'm having the same problem. I'm also upgrading from 1.0.8.2 to 1.1.2 and have tried everything suggested above.

    I noticed some odd behavior though...i have no problem connecting to the DB in the admin area...it works perfectly fine. i can see all the data ...comments, galleries,image names. as soon as i click on a link that points to the gallery itself...it comes up w/the previously mentioned error message. it's accessing the same zp-config file...it doesn't make any sense.

    what's up? any ideas?
  • trisweb Administrator
    felipearroyo - thanks for your comment. This sounds more and more like an upgrade bug than a problem with the data. Can you please submit a ticket to Trac so we can look into it more?

    A couple questions...

    1) Is your old /zen/ folder still around or has it been deleted?

    2) Are you skilled enough in PHP to add some debug code if I give it to you?
  • The ticket has been created... #324

    1 - I still have my old zen folder on my local drive...but it's deleted from the server.
    2 - Lets do it!
Sign In or Register to comment.