1

trying to install CiviCRM with Wordpress and I get the red DB error BUT all the line items are green.

Any suggestions?

Thanks!

WP: 4.9.10
CiviCRM: 4.7.30 Wordpress
Mysql: 5.7 on Azure

Added comment:

I also ran this:

<?php
echo "* SQL CONNECT TEST **";
include('./config.php');
// print_r(get_defined_constants(true));
#phpinfo();
$dbcnx = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
if (!$dbcnx)
{
          print ("<hr /><p>Param(s): " . DB_HOST ." / ". DB_USER ." / ". DB_PASSWORD ." / ". DB_NAME . "</p>\n");
          die ("<hr /><p>Error:" . mysqli_connect_errno() . "</p>\n");
}
echo "<p>Connected to the database server!</p>\n";
echo "</p>\n";
echo "<p>End of script!</p>";
?>

Came out clean, connected and all (config.php is a copy of the Wordpress config file)

So I checked to see if somehow CiviCRM was using mysql_connect() instead of mysqli_connect(), but it's not.

Really at a loss here :-|

All green, but still red...

  • Do you use a port other than the default one (3306)? There is an issue about that in lab.civicrm.org/dev/core/issues/46. Have you tried an up to date version of CiviCRM? 4.7.30 is well out of security updates. – Thomas Schüttler Mar 14 at 9:26
  • I will try a new version today. And no everything is default, which is why I'm baffled ( not my first CC install ). – Jesper Angelo LI Mar 14 at 20:33
0

Is it possible your civicrm_settings.php file is not writable, or is duplicated? If you run php_info() does it confirm that you're running MySQL 5.7? What is your OS?

0

UPDATE: It looks like at the present time you will need to make a small hack to get the installer to be happy. The "does the server exist check" does NOT use the username/password and merely tries to connect as anonymous (https://github.com/civicrm/civicrm-core/blob/5.16.2/install/index.php#L1038). On azure this returns an error 9002, as opposed to the usual 1045 which gets skipped by the next line.

So you should be able to temporarily change that line to

$conn = $this->connect($server, 'username@server', 'your password');

and then after install you can change it back. I don't have an azure database to test if that is sufficient, but just doing a command line test it returns the usual error 1045 so should work.

See also CiviCRM on Azure Not Finding the Server


Based on your screenshot it looks like you have a "control character" as the first character of your server name, which usually happens when you copy and paste from a website page. i.e. a character that isn't actually a letter but might be a tab or non-ascii character.

In any case the error says it can't find mysql on that server, so check that the server name is correct.

  • Well, I could understand that, if it wasn't because it's all copied from VIM from the wp-config.php file, and the Wordpress site is working. – Jesper Angelo LI Mar 13 at 22:38
  • Also, the lines (in green) states Are the access credentials correct? OK MySQL version at least 5.1 OK (MySQL 5.6.39.0) Is auto_increment_increment set to 1 OK Is the provided database name valid? OK Does MySQL thread_stack meet minimum (192k) OK Can I access/create the database? OK (Database 'xxxxx' exists) Can I access/create InnoDB tables in the database? OK Can I create temporary tables in the database? OK Can I create lock tables in the database? OK Can I create triggers in the database? OK – Jesper Angelo LI Mar 13 at 22:39
  • So it's connecting, it seems like. Even the error "Can't find the a MySQL server on ..." seems a little off, given that it states the version is MySQL 5.6.39.0 – Jesper Angelo LI Mar 13 at 22:39
  • Oh shoot, so sorry, forgot comments dont format...! Argh – Jesper Angelo LI Mar 13 at 22:39
  • +1 for vim (he he). But I don't have any more insight to the problem other than the servername. – Demerit Mar 13 at 22:44

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.