diff --git a/core/modules/mysql/src/Driver/Database/mysql/Schema.php b/core/modules/mysql/src/Driver/Database/mysql/Schema.php
index 1d54466a67..57f499ddea 100644
--- a/core/modules/mysql/src/Driver/Database/mysql/Schema.php
+++ b/core/modules/mysql/src/Driver/Database/mysql/Schema.php
@@ -41,6 +41,15 @@ class Schema extends DatabaseSchema {
     'TEXT',
   ];
 
+  /**
+   * @var array
+   *   List of MySQL binary types.
+   */
+  protected $mysqlBinaryTypes = [
+    'VARBINARY',
+    'BINARY',
+  ];
+
   /**
    * Get information about the table and database name from the prefix.
    *
@@ -148,14 +157,14 @@ protected function createTableSql($name, $table) {
   protected function createFieldSql($name, $spec) {
     $sql = "`" . $name . "` " . $spec['mysql_type'];
 
-    if (in_array($spec['mysql_type'], $this->mysqlStringTypes)) {
+    if (in_array($spec['mysql_type'], $this->mysqlStringTypes) || in_array($spec['mysql_type'], $this->mysqlBinaryTypes)) {
       if (isset($spec['length'])) {
         $sql .= '(' . $spec['length'] . ')';
       }
       if (isset($spec['type']) && $spec['type'] == 'varchar_ascii') {
         $sql .= ' CHARACTER SET ascii';
       }
-      if (!empty($spec['binary'])) {
+      if (!empty($spec['binary']) && !in_array($spec['mysql_type'], $this->mysqlBinaryTypes)) {
         $sql .= ' BINARY';
       }
       // Note we check for the "type" key here. "mysql_type" is VARCHAR:
@@ -244,6 +253,9 @@ public function getFieldTypeMap() {
       'varchar:normal'  => 'VARCHAR',
       'char:normal'     => 'CHAR',
 
+      'varbinary:normal' => 'VARBINARY',
+      'binary:normal'    => 'BINARY',
+
       'text:tiny'       => 'TINYTEXT',
       'text:small'      => 'TINYTEXT',
       'text:medium'     => 'MEDIUMTEXT',
diff --git a/core/modules/pgsql/src/Driver/Database/pgsql/Schema.php b/core/modules/pgsql/src/Driver/Database/pgsql/Schema.php
index 5cb6c569e1..9a9177760f 100644
--- a/core/modules/pgsql/src/Driver/Database/pgsql/Schema.php
+++ b/core/modules/pgsql/src/Driver/Database/pgsql/Schema.php
@@ -433,6 +433,9 @@ public function getFieldTypeMap() {
       'varchar:normal' => 'varchar',
       'char:normal' => 'character',
 
+      'varbinary:normal' => 'bytea',
+      'binary:normal' => 'bytea',
+
       'text:tiny' => 'text',
       'text:small' => 'text',
       'text:medium' => 'text',
diff --git a/core/modules/sqlite/src/Driver/Database/sqlite/Schema.php b/core/modules/sqlite/src/Driver/Database/sqlite/Schema.php
index 02e28976af..3ba697a7ec 100644
--- a/core/modules/sqlite/src/Driver/Database/sqlite/Schema.php
+++ b/core/modules/sqlite/src/Driver/Database/sqlite/Schema.php
@@ -229,6 +229,9 @@ public function getFieldTypeMap() {
       'varchar:normal'  => 'VARCHAR',
       'char:normal'     => 'CHAR',
 
+      'varbinary:normal' => 'BLOB',
+      'binary:normal'    => 'BLOB',
+
       'text:tiny'       => 'TEXT',
       'text:small'      => 'TEXT',
       'text:medium'     => 'TEXT',
diff --git a/core/tests/Drupal/KernelTests/Core/Database/SchemaTest.php b/core/tests/Drupal/KernelTests/Core/Database/SchemaTest.php
index 72b40e305c..bd9a319272 100644
--- a/core/tests/Drupal/KernelTests/Core/Database/SchemaTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Database/SchemaTest.php
@@ -530,6 +530,47 @@ public function testSchemaAddFieldDefaultInitial() {
         }
       }
     }
+
+    // Test binary types.
+    foreach (['binary', 'varbinary'] as $bintype) {
+      $base_field_spec = [
+        'type' => $bintype,
+      ];
+      $variations = [];
+      foreach ([NULL, 2, 50] as $length) {
+        if ($bintype == 'varbinary' && empty($length)) {
+          $length = 1;
+        }
+        foreach ([TRUE, FALSE] as $binary) {
+          $variation = [
+            'length' => $length,
+            'binary' => $binary,
+          ];
+          $field_spec = $variation + $base_field_spec;
+          $this->assertFieldAdditionRemoval($field_spec);
+        }
+      }
+    }
+
+    $field_spec['default'] = hex2bin('002701FF7F808100020304B4');
+    $table_name = 'test_table_' . ($this->counter++);
+    $table_spec = [
+      'fields' => [
+        'id' => $field_spec,
+      ],
+    ];
+    $this->schema->createTable($table_name, $table_spec);
+    $this->assertTrue($this->schema->tableExists($table_name), "Table $table_name created.");
+    $this->assertTrue($this->tryInsert($table_name), 'Insert with binary default succeeded.');
+
+    // TODO: convert to use changeField()?
+    // db_field_set_default($table_name, 'id', '');
+    // $this->pass("Table $table_name set default on id to empty string.");
+    // db_field_set_no_default($table_name, 'id');
+    // $this->pass("Table $table_name remove default on id.");
+
+    // Clean-up.
+    $this->schema->dropTable($table_name);
   }
 
   /**
