We could not connect to the database you specified. Please check your database settings.

We could not connect to the database you specified. Please check your database settings.

ved Bipin Das -
Antal besvarelser: 14
Hi everybody,
I am newbie in moodle. When installation part is goin on everything except database connection is OK. When try with database connection part the following error found .

We could not connect to the database you specified.
Please check your database settings.

Very thankful on help

Bipin Das tankefuld
Gennemsnitsbedømmelse: -
I svar til Bipin Das

Re: We could not connect to the database you specified. Please check your database settings.

ved david boulton -

Hi Bipin,

Can you please provide more detain on your problem, ie moodle version, php and mysql also what server you are running on would be nice.

I had this same issue on a windows 2003 server and was able to get around it i would recommend if possible you re-build the machine using windows 2003 and start again.

Dont place mysql on or attemp to configure it as it will cause issues with php when installing.

Cheers,

David,

I svar til david boulton

Re: We could not connect to the database you specified. Please check your database settings.

ved Bipin Das -

Dear sir,

I am giving my infrastructure as follows,

OS  : Trustix Linux 2.2

Mysql  : 4.1

Php  : 4.4

Apache : 2.0

Moodle 1.5

Help appreciated

regards

Bipin Das

I svar til Bipin Das

Re: We could not connect to the database you specified. Please check your database settings.

ved Juan David Martínez Pavony -

Hello.

Can you connect to your Moodle database using command line: mysql -u XXXXX -p moodle

replacing XXXXX with value from your moodle/config.php file and writting the correspondant password from same file?

I svar til Juan David Martínez Pavony

Re: We could not connect to the database you specified. Please check your database settings.

ved david boulton -

Hi,

You should not create the database yourself, as moodle can do it for you. ALl you need to do is use your admin account at the start with moodle and it will create the nessecary files and database.

When asking the mysql settings page can you change you user from admin, if so you actual have done something wrong in the install process.

We took it step by step and only install mysql when it first told me to place in the mysql settings.

If you can rebuilding your server and start again and i will post a step by step guide which im writing up at this point in time here.

Cheers,

I svar til david boulton

Re: We could not connect to the database you specified. Please check your database settings.

ved Bipin Das -
Hi all,
While configuring moodle first time,when we reach to database part there is a hint regarding the database creation. I past it below.

"This database must already have been created and a username and password created to access it."

Thats why I had already created my database for moodle

Database name -- cms
Database user -- cms
Database Passwd- cmstest

I can connect to this database by using the command line argument

mysql -u cms -p

My config.php file doesnt create yet.


Kindly help

regards
Bipin Das

I svar til david boulton

Re: We could not connect to the database you specified. Please check your database settings.

ved Bipin Das -
Sir,

I had rebuild my server. Waiting for your response to install moodle


regards

Bipin Das
I svar til Bipin Das

Re: We could not connect to the database you specified. Please check your database settings.

ved Iñaki Arenaza -
Billede af Core developers Billede af Documentation writers Billede af Particularly helpful Moodlers Billede af Peer reviewers Billede af Plugin developers
Make sure you have the PHP mysql extension installed and activated. Have a look at your PHP.ini file and search for a line that reads:

extension=mysq.so

Also make sure you are not running apache under SElinux or a similar security environment.

Saludos. Iñaki.
I svar til Iñaki Arenaza

Re: We could not connect to the database you specified. Please check your database settings.

ved Bipin Das -
Dear sir,
I have installed and activated the mysql.so extension. I am using Trustix linux as my OS , in this there is no SElinux installed. But I have still trouble while database connection part.

Thanx in advance

Bipin Das

I svar til Bipin Das

Re: We could not connect to the database you specified. Please check your database settings.

ved Steve Hughes -

did you ever get this fixed? I am having same problem..

steve

I svar til Juan David Martínez Pavony

Re: We could not connect to the database you specified. Please check your database settings.

ved Pippo Pippo -
I Hi... I have the same problem. i created an account... From the command line everything is fine... B But with the same datas in the config.php... or If I provide them in the installation form moodle can't connect. Why?
I svar til Pippo Pippo

Re: We could not connect to the database you specified. Please check your database settings.

ved gebari hadagi -

I'm also installing moodle on EasyPHP and i've got same problem,

so would you please help/

I svar til gebari hadagi

Re: We could not connect to the database you specified. Please check your database settings.

ved Mary Evans -
Billede af Core developers Billede af Documentation writers Billede af Peer reviewers Billede af Plugin developers Billede af Testers
Have you set your PHP Extensions? You should have php_ MySQLi and php_MySQL extensions set.

If you have then have you set up your MySQL database correctly?

Did you type in the correct database name and password in the Moodle install?




I svar til Mary Evans

Re: We could not connect to the database you specified. Please check your database settings.

ved John Petroff -

Hi all,

I struggled with the same error message for a couple of days. I found the solution in the explanation for mysql_connect() in MySQL manual which shows that "host name" may require a port number for PHP 3.0 or higher. Thus, instead of leaving "localhost", I add the socket number given to me in my MySQL control panel ... and it worked.

I hope this helps someone. I suppose Moodle installation docs should also have a mention of this.

John

I svar til Bipin Das

Re: Mac OS X - We could not connect to the database you specified. Please check your database settings.

ved Claude Coulombe -

Greetings folks,

If you've got this error using Mac OS X with a MySQL server already installed (not using MAMP), have a look to:

http://support.apple.com/kb/TS1999?viewlocale=en_US

You should have to change the mysql.default_socket settings in the php.ini file.

For instance :

mysql.default_socket=/tmp/mysql.sock

Best

Claude