Page 1 of 1
Could not connect to the database
Posted: Fri Dec 28, 2007 5:46 pm
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
Re: Could not connect to the database
Posted: Fri Dec 28, 2007 6:02 pm
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
Re: Could not connect to the database
Posted: Sat Dec 29, 2007 4:10 pm
by balai
i created a new database but still have the same error
Re: Could not connect to the database
Posted: Sat Dec 29, 2007 6:21 pm
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 '%'
Re: Could not connect to the database
Posted: Mon Dec 31, 2007 1:58 pm
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.
Re: Could not connect to the database
Posted: Mon Dec 31, 2007 3:06 pm
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.
Re: Could not connect to the database
Posted: Sun Jan 06, 2008 9:53 pm
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
Re: Could not connect to the database
Posted: Mon Jan 07, 2008 4:35 am
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.
Re: Could not connect to the database
Posted: Mon Jan 07, 2008 7:34 am
by Dr.CSS
It helps if you tell what it's running on first off...

Re: Could not connect to the database
Posted: Tue Jan 15, 2008 2:12 pm
by balai
do i need to put in any data in mysql when installing with cpanel?
(SOLVED): Could not connect to the database
Posted: Tue Jan 15, 2008 2:21 pm
by balai
THANKS