Laravel Version
12.39.3
PHP Version
8.2
Database Driver & Version
MYSQL 8.4.3
Description
When I try to import a schema.dump file into a MySQL database over SSL, I can’t provide the --ssl-cert and --ssl-key options, because the import command only supports --ssl-ca. Also, why is the --ssl=off option commented out?
Steps To Reproduce
laravel/framework/src/Illuminate/Database/Schema/MySqlSchemaState.php line 108
protected function connectionString()
{
$value = ' --user="${:LARAVEL_LOAD_USER}" --password="${:LARAVEL_LOAD_PASSWORD}"';
$config = $this->connection->getConfig();
$value .= $config['unix_socket'] ?? false
? ' --socket="${:LARAVEL_LOAD_SOCKET}"'
: ' --host="${:LARAVEL_LOAD_HOST}" --port="${:LARAVEL_LOAD_PORT}"';
if (isset($config['options'][\PDO::MYSQL_ATTR_SSL_CA])) {
$value .= ' --ssl-ca="${:LARAVEL_LOAD_SSL_CA}"';
}
// if (isset($config['options'][\PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT]) &&
// $config['options'][\PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT] === false) {
// $value .= ' --ssl=off';
// }
return $value;
}