Hi all,
I have installed zenphoto before, but I have since moved to a new host and I'm trying to do a clean install. I cannot for the LIFE of me remember how to write the database info.
First, I added the new database (named zenphoto) in MySQL databases. Then I added the user (named susan) and added a unique password (not shown below). Then I added the new user to the database.
Then in the config file, I wrote it like this:
$conf['mysql_user'] = "fivenel9_susan";
$conf['mysql_pass'] = "password";
$conf['mysql_host'] = "localhost"; // Won't need to change this 90% of the time.
$conf['mysql_database'] = "fivenel9_zenphoto";
What am I doing wrong because what I get when trying to run the setup is:
MySQL Error: Could not connect to the database server. Check your zp-config.php file for the correct Host, User name, and Password.
Can anyone help me? TIA!
Comments
My host gives me a snippet like this on the database page:
PHP `$dbh=mysql_connect ("localhost", "awilson_guser", "") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("awilson_gallerydb");`
which should show you at least the host, username, and database name so you can confirm they are correct.
Connection Strings
Perl $dbh = DBI->connect("DBI:mysql:fivenel9_photos:localhost","fivenel9_photos","<PASSWORD HERE>");
PHP $dbh=mysql_connect ("localhost", "fivenel9_photos", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("fivenel9_photos");
You can read about that here... might help:
http://dev.mysql.com/doc/refman/5.0/en/old-client.html
Thank you for the link. I'm not sure I understand any of it, but I will look into it.
Check their settings and make sure they match those for Zenphoto.
Also make sure that the database you're using has specific permissions set for the user you're using. You can use phpMyAdmin to check that...
ivenel9_wrdp1 (Privileges: ALL PRIVILEGES)
Connection Strings
Perl $dbh = DBI->connect("DBI:mysql:fivenel9_wrdp1:localhost","fivenel9_wrdp1","<PASSWORD HERE>");
PHP $dbh=mysql_connect ("localhost", "fivenel9_wrdp1", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("fivenel9_wrdp1");
And then here's what I have currently for Zenphoto:
fivenel9_photos (Privileges: ALL PRIVILEGES)
Connection Strings
Perl $dbh = DBI->connect("DBI:mysql:fivenel9_photos:localhost","fivenel9_photos","<PASSWORD HERE>");
PHP $dbh=mysql_connect ("localhost", "fivenel9_photos", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("fivenel9_photos");
To my untrained eye, it looks like everything matches. Do they to you?
I don't understand how to check that the database has specific permissions set using phpMyAdmin. When I go into phpMyAdmin, nothing shows up for the Zenphoto user. I mean, the user is in the dropdown list, but then there's no information available on it.
I'm sorry if I seem to be asking dumb questions. I just really want to get this working because I know how wonderful Zenphoto is.
If so, it should be:
susan_somethingdb
susan_myname
I make the names easy to remember like: User = susan_zen, db = susan_zendb
knotty
`$conf['mysql_user'] = "fivenel9_photos";
$conf['mysql_pass'] = "";
$conf['mysql_host'] = "localhost"; // Won't need to change this 90% of the time.
$conf['mysql_database'] = "fivenel9_photos";`
Try those and see if that works....
Otherwise, try using the wordpress settings and adding a table prefix (the next config option), it should be able to use the Wordpress tables without any problem:
`$conf['mysql_user'] = "fivenel9_wrdp1";
$conf['mysql_pass'] = "";
$conf['mysql_host'] = "localhost"; // Won't need to change this 90% of the time.
$conf['mysql_database'] = "fivenel9_wrdp1";
$conf['mysql_prefix'] = "zp_";
`
I just sent you two emails (the second an update to the first). It'll be from Susan [at] TheWebDesignLoft [dot] com.
Thank you very much!!
~Susie
The problem was very interesting -- the zp-config.php file got garbled with HTML, which is probably a consequence of that file manager from cPanel, which is horrible. Next time, use FTP to download the file, edit in notepad or other *real* text editor, and re-upload.
Also, in the future, it's good to give all details about the problem, like the fact that the entire zp-config.php file was printed on the front page of your Zenphoto install, and the whole MySQL error string printed below it, which had "nobody" as the user, indicating that the zp-config.php file could not be read.
I'll be putting a check for this in the setup. Thanks for letting me debug on your server; I've deleted the email and already can't remember the password ;-)
Thanks again!! :-)