Title: Undefined class constant &#8216;MYSQL_ATTR_INIT_COMMAND&#8217;
Last modified: October 22, 2019

---

# Undefined class constant ‘MYSQL_ATTR_INIT_COMMAND’

 *  Resolved [bartprosite](https://wordpress.org/support/users/bartprosite/)
 * (@bartprosite)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/undefined-class-constant-mysql_attr_init_command/)
 * When trying to connect to a Drupal database I get the error below. I edited out
   some parts of the foldernames.
 * Fatal error: Uncaught Error: Undefined class constant ‘MYSQL_ATTR_INIT_COMMAND’
   in /home/*****/staging/protinttowp.staging.*****.us/wp-content/plugins/fg-drupal-
   to-wp/admin/class-fg-drupal-to-wp-admin.php:522 Stack trace: #0 /home/*****/staging/
   protinttowp.staging.*****.us/wp-content/plugins/fg-drupal-to-wp/admin/class-fg-
   drupal-to-wp-admin.php(788): FG_Drupal_to_WordPress_Admin->drupal_connect() #
   1 /home/*****/staging/protinttowp.staging.*****.us/wp-content/plugins/fg-drupal-
   to-wp/admin/class-fg-drupal-to-wp-admin.php(328): FG_Drupal_to_WordPress_Admin-
   >test_database_connection() #2 /home/*****/staging/protinttowp.staging.*****.
   us/wp-content/plugins/fg-drupal-to-wp/admin/class-fg-drupal-to-wp-admin.php(236):
   FG_Drupal_to_WordPress_Admin->dispatch(‘test_database’) #3 /home/*****/staging/
   protinttowp.staging.*****.us/wp-includes/class-wp-hook.php(286): FG_Drupal_to_WordPress_Admin-
   >ajax_importer(”) #4 /home/*****/staging/protinttowp.staging.*****.us/wp-includes/
   class-wp-hook.php(310): WP_Hook- in /home/*****/staging/protinttowp.staging.*****.
   us/wp-content/plugins/fg-drupal-to-wp/admin/class-fg-drupal-to-wp-admin.php on
   line 522
    The site is experiencing technical difficulties.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Kerfred](https://wordpress.org/support/users/kerfred/)
 * (@kerfred)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/undefined-class-constant-mysql_attr_init_command/#post-12052696)
 * The solution is described in this FAQ: [https://www.fredericgilles.net/support/kb/faq.php?id=9](https://www.fredericgilles.net/support/kb/faq.php?id=9)
 *  Thread Starter [bartprosite](https://wordpress.org/support/users/bartprosite/)
 * (@bartprosite)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/undefined-class-constant-mysql_attr_init_command/#post-12052972)
 * That was the solution! Thanks. Doing some testing for a customer. Looking good.
 *  Thread Starter [bartprosite](https://wordpress.org/support/users/bartprosite/)
 * (@bartprosite)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/undefined-class-constant-mysql_attr_init_command/#post-12052982)
 * Extra question: I have to migrate a multilingual site (3 languages) with multiple
   content types, views, etc to WP.
    I want to keep the cost as low as possible,
   so I will be opting for CPT-UI for the post types in WP and ACF for the custom
   fields. I think for multilaguage WPML will be the best (only?) option.
 * Does the Pro version support this?
 *  Plugin Author [Kerfred](https://wordpress.org/support/users/kerfred/)
 * (@kerfred)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/undefined-class-constant-mysql_attr_init_command/#post-12054789)
 * Currently, we only support Toolset Types that manages both custom post types,
   custom taxonomies and custom fields.
 * WPML is supported. You need the Internationalization add-on: [https://www.fredericgilles.net/fg-drupal-to-wordpress/internationalization/](https://www.fredericgilles.net/fg-drupal-to-wordpress/internationalization/)

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Undefined class constant ‘MYSQL_ATTR_INIT_COMMAND’’ is closed to new 
replies.

 * ![](https://ps.w.org/fg-drupal-to-wp/assets/icon-256x256.png?rev=1490014)
 * [FG Drupal to WordPress](https://wordpress.org/plugins/fg-drupal-to-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/fg-drupal-to-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/fg-drupal-to-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/fg-drupal-to-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/fg-drupal-to-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/fg-drupal-to-wp/reviews/)

## Tags

 * [php-error](https://wordpress.org/support/topic-tag/php-error/)

 * 4 replies
 * 2 participants
 * Last reply from: [Kerfred](https://wordpress.org/support/users/kerfred/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/undefined-class-constant-mysql_attr_init_command/#post-12054789)
 * Status: resolved