Problem connecting to 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
jen

Problem connecting to database...

Post by jen »

Hi,

I'm hoping someone can help me.

I'm trying to install CMS made simple, everything goes smoothly until I try to connect to the database I created. It's a MySQL 5.0.21 database and I can succesfully log in to it using PHP MyAdmin so I am certain that my username and password are correct. I called my hosting company to confirm the host address (which is separate - ie. not 'localhost') and check that I had all the details correct which I do. I also checked with them that I had complete user privileges and they confirmed that I do.

I've tried typing everything in several times to check that everything's spelt correctly but without success. I continue to get the following error message:
'Could not connect to database. Verify that username and password are correct, and that the user has access to the given database.'

It is a database supplied by the hosting company and as a result of that has a pretty long name (and contains underscores _), my password contains symbols (a ? and an =) - could these be what is causing me problems?

Any help or suggestions will be gratefully recieved...
Jen

PS. I'm running CMS Made Simple Version 0.13. and MySQL 5.0.21  on Linux - which supports both php4 and 5
Last edited by jen on Thu Jun 15, 2006 2:39 pm, edited 1 time in total.
Piratos

Re: Problem connecting to database...

Post by Piratos »

Normal you need this things and the right value (config.php)

$config['dbms'] = 'mysqli';
$config['db_hostname'] = 'localhost';
$config['db_username'] = 'root';
$config['db_password'] = 'mysecretpassword';
$config['db_name'] = '013';

if someone is wrong you could not connect to mysql.

most times mysqli is not installed use mysql - you can see it with phpinfo.
jen

Re: Problem connecting to database...

Post by jen »

Hmm. My config.php file contains this:



should I just remove this and replace with the code you gave me between <?php tags and change the hostname etc to mine?

Sorry, I don't really know what I'm doing with PHP.

Jen
jen

Re: Problem connecting to database...

Post by jen »

Sorted!

Just removed everything from config.php and started again... Seemed to do the trick.

Thanks Piratos for trying to help.

Jen
Chuky
Forum Members
Forum Members
Posts: 31
Joined: Wed Mar 29, 2006 3:06 pm

Re: Problem connecting to database...

Post by Chuky »

Hello,
Is this a problem with msql 5.0? I am having the same issues trying to install this with mysql 5. The same error cant connect to database, make sure all details are correct. Everything is correct. The config.php is not writing anything . It has the right permissions set. What can I do?
Do I manually write the config.php file? Also on that page for mysql connection, the only options there are for database types are mysql 3 and 4.0 and no 5.0.. , could this be the course?
persepolis

Re: Problem connecting to database...

Post by persepolis »

I have the same problem using PHP 4.4.2 and MySQL 41.20 on Windows XP
I can't login - is there something in PHP/MySQL-Configuration I have to consider ?

I tried to edit the config.php by



Please note the mysqld, because mysql.ini says i use the section mysqld.

Anyway even the unchanged config.php did not work  ???
Locked

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