Gita Prasetya Adiguna
Gita Prasetya Adiguna

Reputation: 399

How to fix MySQL error 1064 on import with error near "json DEFAULT NULL' with SQL file generated from 'Export' fufnction in phpmyadmin

I generate SQL file from phpmyadmin in one server, but get error 1064 when importing to another phpmyadmin server with error near line "json DEFAULT NULL"

Hi, i was Exporting an SQL file from phpmyadmin, and then imported it to another server with phpmyadmin but get the following error

I would be thankfull if you could point me where i did wrong.

Thankyou very much.

Error

SQL query:

--

-- Database: gitaemr


--

-- Table structure for table com_gita_paycheck_staff

CREATE TABLE `com_gita_paycheck_staff` (
  `id` int(11) NOT NULL,
  `hour` float DEFAULT NULL,
  `shift` float DEFAULT NULL,
  `services` json DEFAULT NULL,
  `sversion` varchar(45) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1

MySQL said: Documentation

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use

near 'json DEFAULT NULL, sversion varchar(45) DEFAULT NULL ) ENGINE=InnoDB DEFAULT' at line 15

Upvotes: 0

Views: 3712

Answers (1)

Michael
Michael

Reputation: 13

you can change json to array, yes it's because of MariaDB Version on Debian stable has no json

Upvotes: 0

Related Questions