Issue on connect MySQL Cluster via MySQL Router

Created on 16 April 2024, 3 months ago
Updated 30 April 2024, 2 months ago

Hi,

I am not able to connect MySQL Cluster via MySQL Router by the given details below in settings.php
$databases['default']['default'] = [
'database' => 'drupal db name',
'username' => 'dbusername',
'password' => '***********',
'host' => '127.0.0.1',
'port' => 6446,
'driver' => 'mysql',
];

I can be able to connect to MySQL Cluster via MySQL Router by the below command
mysql -u dbusername -h 127.0.0.1 -P 6446 -p *********

πŸ’¬ Support request
Status

Closed: outdated

Version

10.1 ✨

Component
MySQL driverΒ  β†’

Last updated 26 days ago

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @mmrao.dr@gmail.com
  • Status changed to Postponed: needs info 3 months ago
  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    Please enable verbose logging and let us know what the actual error message and stack trace are: https://www.drupal.org/docs/develop/development-tools/enable-verbose-err... β†’

  • Hi,

    I have enabled verbose by the below line in settings.php file, but I can see "The website encountered an unexpected error. Please try again later"

    $config['system.logging']['error_level'] = 'verbose';

  • πŸ‡ΊπŸ‡ΈUnited States cilefen

    Hello. Drupal and PHP log errors and I suggest you do some reading on your end about how to set PHP’s error reporting.

  • Hello Cilefen,
    I have attached logs. Could you please help me with this?

    /var/log/httpd

    /var/loh/php-fpm

  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    There is a typo in your settings.php:

    ParseError: syntax error, unexpected token ";", expecting ")" in /web/www/html/drupal10_source/web/sites/default/settings.php on line 873
    
  • Status changed to Closed: outdated 3 months ago
  • πŸ‡ΊπŸ‡ΈUnited States cilefen

    You must use valid PHP syntax in settings.php.

  • Hi,
    The error in settings.php is already fixed. But still, I can't connect MySQL cluster via MySQL Router.

  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    We've explained the errors in your logs; if you've fixed both errors there must be another error being logged somewhere that you haven't shown us.

  • Hi,
    I don't see other errors after fixing the PHP syntax errors. And I have checked the MySQL router logs also. But no error logs.

  • πŸ‡ΊπŸ‡ΈUnited States cilefen

    If there are no errors to analyze we cannot offer support.

  • Is it possible to set up a call?

  • πŸ‡ΊπŸ‡ΈUnited States cilefen

    A support call? Drupal is not a company with a support system.

    For a more interactive support experience consider the #support channel in Slack β†’ .

    For paid support, there are Drupal Certified Partners β†’ .

  • Hi All,

    The below logs were generated. Could you please help with this?

    [root@drupal-prd-web1 mysqlrouter]# date
    Tue Apr 30 04:37:39 PM IDT 2024

    [root@drupal-prd-web1 mysqlrouter]# tail -f mysqlrouter.log

    2024-04-30 16:21:28 routing INFO [7f956d7fa640] [routing:bootstrap_x_ro] started: routing strategy = round-robin-with-fallback
    2024-04-30 16:21:28 routing INFO [7f956e7fc640] [routing:bootstrap_ro] started: routing strategy = round-robin-with-fallback
    2024-04-30 16:21:28 routing INFO [7f956d7fa640] Start accepting connections for routing routing:bootstrap_x_ro listening on 6449
    2024-04-30 16:21:28 routing INFO [7f956e7fc640] Start accepting connections for routing routing:bootstrap_ro listening on 6447
    2024-04-30 16:21:28 metadata_cache INFO [7f9598460640] Connected with metadata server running on drupal-prd-db3:3306
    2024-04-30 16:21:28 metadata_cache INFO [7f9598460640] Potential changes detected in cluster after metadata refresh (view_id=0)
    2024-04-30 16:21:28 metadata_cache INFO [7f9598460640] Metadata for cluster 'drupaldbcluster' has 3 member(s), single-primary:
    2024-04-30 16:21:28 metadata_cache INFO [7f9598460640] drupal-prd-db3:3306 / 33060 - mode=RW
    2024-04-30 16:21:28 metadata_cache INFO [7f9598460640] drupal-prd-db1:3306 / 33060 - mode=RO
    2024-04-30 16:21:28 metadata_cache INFO [7f9598460640] drupal-prd-db2:3306 / 33060 - mode=RO

  • πŸ‡ΊπŸ‡ΈUnited States cilefen

    There does not seem to be any errors there.

Production build 0.69.0 2024