Have you checked over all the errors that the error message is calling out to you.
It's telling you what's wrong.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm using MAMP and MYSQL I seem to be having trouble with JSON columns.
I am using MAMP version 3.4 and MySQL version 5.5.42. I'm trying to migrate Laravel media libraries package:
Illuminate\Database\QueryException : SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'json not null, `custom_properties` json not null, `responsive_images` json not n' at line 1 (SQL: create table `media` (`id` int unsigned not null auto_increment primary key, `model_type` varchar(191) not null, `model_id` bigint unsigned not null, `collection_name` varchar(191) not null, `name` varchar(191) not null, `file_name` varchar(191) not null, `mime_type` varchar(191) null, `disk` varchar(191) not null, `size` int unsigned not null, `manipulations` json not null, `custom_properties` json not null, `responsive_images` json not null, `order_column` int unsigned null, `created_at` timestamp null, `updated_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')
at /Applications/MAMP/htdocs/community/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
660| // If an exception occurs when attempting to run a query, we'll format the error
661| // message to include the bindings with SQL, which will make this exception a
662| // lot more helpful to the developer instead of just the database's errors.
663| catch (Exception $e) {
> 664| throw new QueryException(
665| $query, $this->prepareBindings($bindings), $e
666| );
667| }
668|
Exception trace:
1 PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'json not null, `custom_properties` json not null, `responsive_images` json not n' at line 1")
/Applications/MAMP/htdocs/community/vendor/laravel/framework/src/Illuminate/Database/Connection.php:452
2 PDO::prepare("create table `media` (`id` int unsigned not null auto_increment primary key, `model_type` varchar(191) not null, `model_id` bigint unsigned not null, `collection_name` varchar(191) not null, `name` varchar(191) not null, `file_name` varchar(191) not null, `mime_type` varchar(191) null, `disk` varchar(191) not null, `size` int unsigned not null, `manipulations` json not null, `custom_properties` json not null, `responsive_images` json not null, `order_column` int unsigned null, `created_at` timestamp null, `updated_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci'")
/Applications/MAMP/htdocs/community/vendor/laravel/framework/src/Illuminate/Database/Connection.php:452
Please or to participate in this conversation.