Page 1 of 1

Could not connect to the database.

Posted: Wed Nov 07, 2007 2:21 pm
by jcolome
I'm sorry to bother you folks but I really want to try this program out and I'm having a hard time getting the DB to work - I'm very good at following directions and so far have had NO luck connecting to the DB -  http://www.jcolome.com

I Read the instructions but I keep getting a:

Could not connect to the database. Verify that username and password are correct, and that the user has access to the given database.
Should be a No brainer right ?

This is what I have so far - This is the name of your site. It will be used in various places of the default templates and can be used anywhere with the {sitename} tag.



Database Information
Make sure you have created your database and granted full privileges to a user to use that database.

For MySQL, use the following:

Log in to mysql from a console and run the following commands:

create database cms; (use whatever name you want here but make sure to remember it, you'll need to enter it on this page)
grant all privileges on cms.* to cms_user@localhost identified by 'cms_pass';
Please complete the following fields:

Database Type:  MySQL 
Database host address  (blank)
Database name:  jcolome1_cms
Username:  jcolome1_jcolome
Password: ******** 
Table prefix: cms_   
Create Tables (Warning: Deletes existing data)  checked
Install sample content and templates  - checked


Here's what is on the Cpanel -


Current Databases:
jcolome1_cms   
Users in cms
jcolome1_jcolome (Privileges: ALL PRIVILEGES)

Connection Strings
Perl $dbh = DBI->connect("DBI:mysql:jcolome1_cms:localhost","jcolome1_jcolome","");
PHP $dbh=mysql_connect ("localhost", "jcolome1_jcolome", "") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("jcolome1_cms"); 


 

New Database:   


--------------------------------------------------------------------------------

Current Users:
jcolome1_jcolome

 

Username:   
Password:   


--------------------------------------------------------------------------------

Add Users To Your Databases:
 
User: jcolome1_jcolome Database: jcolome1_cms
Privileges:
ALL or  SELECT  CREATE
   INSERT  ALTER
   UPDATE  DROP
   DELETE  LOCK TABLES
   INDEX  REFERENCES
   CREATE TEMPORARY TABLES

Any ideas what I can be doing WRONG :-(

Getting really pissed off here (sorry for the french)

Also, changed file permissions as instructed in the docs


Thanks -

Jcolome

Re: Could not connect to the database.

Posted: Wed Nov 07, 2007 2:58 pm
by alby
jcolome wrote: I'm sorry to bother you folks but I really want to try this program out and I'm having a hard time getting the DB to work - I'm very good at following directions and so far have had NO luck connecting to the DB -  http://www.jcolome.com
If you have cpanel follow this howto

Alby

Re: Could not connect to the database.

Posted: Wed Nov 07, 2007 4:29 pm
by jcolome
Done that - done everything I possibly can, actually - I give UP :-(

By the way - I see that your in Italy ?

my daughter is now in Italy :-)

Capri -

Re: Could not connect to the database.

Posted: Wed Nov 07, 2007 5:42 pm
by Dr.CSS
Don't give up yet, if what you posted is how you filled the step for DB access you have 'Database host address  (blank)' you may want to try Database host address  localhost....

Re: Could not connect to the database.

Posted: Wed Nov 07, 2007 8:00 pm
by Pierre M.
Hello,

I agree with Mark :
jcolome wrote: Database host address  (blank)
try "localhost" or "127.0.0.1" (the IP of the loopback interface on the local host) obviously without the quotes.

Pierre M.

edit : PS : and let the database "TCP port" be the MySQL standard, 3306 if I remember well (but CMSms knows it better).

Re: Could not connect to the database.

Posted: Wed Nov 07, 2007 10:23 pm
by jcolome
OK- now were getting somewhere  ;)


Now I get this err msg: 

Updating hierarchy positions...[done]

Setting up core events...[done]

Installing modules...

Fatal error: Call to a member function on a non-object in /home/jcolome1/public_html/install/lib/classes/CMSInstallerPage5.class.php on line 182

Now of which I can't even get to the root -

Not Found
The requested URL was not found on this server.

Is this great or what ?



Jcolome

Re: Could not connect to the database.

Posted: Thu Nov 08, 2007 3:08 am
by Dr.CSS
I would try reuploading, FTP, all folders/files then rerun install...

Which FTP client?...

Re: Could not connect to the database.

Posted: Thu Nov 08, 2007 10:41 pm
by Pierre M.
Hello again,

yes, FTP. If it doesn't fix your issue, please tell us more : hosting, OS, versionS, logS, setings...
BTW, your hosting provider (or cPanel, I don't know cPanel) should give you the right db host.

Pierre M.