Could not connect to the database

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
balai

Could not connect to the database

Post by balai »

This is the error massage i get when I try installing in step 3 Could not connect to the database. Verify that username and password are correct, and that the user has access to the given database

working with cmsmadesimple version 1.2.2

Database Type:  MySQL   
Database host address : localhost
Database name : cms
Username: root
Password: ******
Table prefix : cms_

am using cpanel with
PHP version 4.4.7
MySQL version 4.0.27-standard
have created corresponding database at the server side.


please help
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Could not connect to the database

Post by tsw »

never use root for normal operations account!

create new mysql user that has access to a new db.

test that you can connect to the db from shell with mysql -uUSERNAME -hDATABASEHOST -p DATABASENAME
balai

Re: Could not connect to the database

Post by balai »

i created a new database but still have the same error
fmouragues

Re: Could not connect to the database

Post by fmouragues »

Hi,
Check your user profile, if you try to connect "in local".
You need to add 'localhost' privilege to data base server instead of '%'
balai

Re: Could not connect to the database

Post by balai »

I have read all post on the same issue tried all week to jump past this step but all with no success
I have given up hope on using CMSMS. Not that  its not a good CMS but I just can't firgure out what i have been doing wrong
so thnk you guys for the help.
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Could not connect to the database

Post by tsw »

This forum is getting way too much posts about howto create and connect to database..

for all those users:

use the forum search:

http://dev.mysql.com/doc/refman/5.0/en/ ... abase.html


if that doesn't google is your friend:

http://www.justfuckinggoogleit.com/sear ... sql+server


and there is always the definitive source (mysql documentation)

http://dev.mysql.com/doc/refman/5.0/en/ ... abase.html

If you are 99.99% sure that the problem is in cms made simple write a bug report.

If you are on a hosting environment and dont know how to create a database on that particular hoster, ask them you pay them for support.

If you know you already have a database on your hoster double check the info (for example localhost might not be the right server for you) and if it doesnt work ask them (again you pay for them to support you)

If you hoster doesnt know, switch hosts.

wwwillem
Forum Members
Forum Members
Posts: 17
Joined: Sun Jan 06, 2008 8:16 pm

Re: Could not connect to the database

Post by wwwillem »

Hi fmouragues,
fmouragues wrote: Check your user profile, if you try to connect "in local".
You need to add 'localhost' privilege to data base server instead of '%'
Could you please explain this a bit more? Where should I check the user profile? Which file? And where do I add this 'localhost' privilege to data base server.

I've spent the last 6 hours getting beyond page 3 of the install. :-( The user I created in MySQL has no problems logging in from the command-line ("mysql -uwillem -hfornax -psecret" and then "use cms"). It can get to the database and create/query/drop tables.

Therefore, more pointers to the MySQL docs, doesn't help much because from a MySQL point of view it's all fine. Also PhpMyAdmin works fine with this database. I used it to verify the 'cms' database and that the user has all permissions set.

Oh yeah, I'm running this all one local server, but I've (in MySQL) even created three different users: willem@localhost, willem@host and willem@host.domain (of course real names for host and domain).

I've even written a small piece of php that allows that same user to do query. But still the CMSMS install refuses to go to page 4.



I've taken out all the print statements that prove that this code executes fine.

So, why does this work, but not the CMSMS install ???
Willem
wwwillem
Forum Members
Forum Members
Posts: 17
Joined: Sun Jan 06, 2008 8:16 pm

Re: Could not connect to the database

Post by wwwillem »

I experimented further. What I described above was on a Fedora Core 3 box. I repeated the whole thing on a system running CentOS 4.4. And suddenly the install went fine.

Then I thought of downgrading CMSMS on the FC3 box. I picked CMSMS 1.0.2 and yep, now page 3 went fine. However at the end of the install, I got only partial pages. Things were pretty shaky.

So I guess I'll have to upgrade my FC3 to something newer. Which is a pain the butt of course, but so be it.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Could not connect to the database

Post by Dr.CSS »

It helps if you tell what it's running on first off... ;)
balai

Re: Could not connect to the database

Post by balai »

do i need to  put in any data in mysql when installing with cpanel?
balai

(SOLVED): Could not connect to the database

Post by balai »

THANKS
Locked

Return to “[locked] Installation, Setup and Upgrade”