0

I'm trying to install CiviCRM 4.7.12 in Drupal7 but I'm unable to proceed with the CiviCrm Installer. Right at the top of the page (outside of the Installer box) I have this error:

Warning: mysqli_real_escape_string() expects parameter 1 to be mysqli, boolean given in ...\docroot\sites\all\modules\civicrm\install\index.php on line 1256

Which is this line: $query = sprintf("CREATE DATABASE %s", mysqli_real_escape_string($conn, $database));

After that I can't make the requeriments match, and because of this, I can't procced with the installation. Apart from the error: Your database settings don't appear to be correct, which seems to be default, according to the Installation guide documentation, I have this list of errors:

CiviCRM Database Details

Are the access credentials correct? -> That username/password doesn't work: Access denied for user 'civicrm'@'localhost' (using password: NO)

Can I access/create the database? -> I can't create new databases and the database 'civicrm' doesn't exist. (user 'civicrm' doesn't have CREATE DATABASE permissions.)

Can I access/create InnoDB tables in the database? -> Unable to create InnoDB tables. MySQL InnoDB support is required for CiviCRM but is either not available or not enabled in this MySQL database server. Could not determine if MySQL has InnoDB support. Assuming no.

Can I create temporary tables in the database? -> Could not login to the database.

Can I create lock tables in the database? -> Could not connect to the database server.

Can I create triggers in the database? -> Could not login to the database.

Drupal Database Details

Are the access credentials correct? -> That username/password doesn't work: Access denied for user 'drupal'@'localhost' (using password: NO)

Can I access/create the database? -> The database: 'drupal' does not exist.

I just started a blank Drupal instance and the only thing I'm trying to install is CiviCRM, I'm also following these steps, the only one o got a little confused was step 2.

Am I supposed to replace my settings.php with that line of code? Because mine just have this $databases = array(); while the one on the guide is filled with information.

What am I doing wrong?

2

The real issue is that your database credentials are invalid.

Access denied for user 'civicrm'@'localhost' (using password: NO)

Access denied for user 'drupal'@'localhost' (using password: NO)

Most likely the warning you are seeing is due to the connection object being FALSE as a result of not being able to connect, instead of a mysqli connection object.

The database: 'drupal' does not exist.

You should also at the very least create the drupal and civicrm databases you intend to use; Drupal and CiviCRM's installation will create all the necessary tables.

  • I tried to create those tables, but the errors still appear to me. Do I need to also manually create/change those users on the phpmyadmin? – CelsomTrindade Oct 6 '16 at 18:45
  • Go to the section titled "Create a database and user using phpMyAdmin" - drupal.org/docs/7/installing-drupal-7/… – user3827 Oct 6 '16 at 19:08
  • but i st the first error causing a "no database connection", and with it generating the other errors? – CelsomTrindade Oct 6 '16 at 19:12
  • No, it is the other way around. It is also not an error but a PHP warning. – user3827 Oct 6 '16 at 19:39
  • 1
    It happens that this problem was happening because of some permissions. After I created the databases, I started getting write permissions errors. I changed the enviroment to my wamp server and now It's working. But anyway, I would need to create the database before proceding anyway, so, thanks for the hint. – CelsomTrindade Oct 7 '16 at 15:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.