Mysql Error: json_set does not exist

0

Currently I'm using Laravel to build some projects (personal); I have no experience with the framework, but a problem appeared, apparently due to MYSQL.

I created a table named tabelateste and in this table the following columns

ToupdatethecolumnparamsIusedtheupdateaccordingtoLaravelDOC

update(['params->filter'=>$request->input('data')]);

Howevertheerrorisreturned

  

SQLSTATE[42000]:Syntaxerrororaccessviolation:1305FUNCTION  database.json_setdoesnotexist(SQL:updatetabelatesteset  params=json_set(params,'$."filter"', 1,2,3) where    account = 18)

I made the same query generated by Laravel directly at the mysql prompt and returned the same error

  

FUNCTION database.json_set does not exist

The version of my Mysql is 5.7, the minimum version required by Laravel in Doc.

    
asked by anonymous 12.11.2018 / 21:30

1 answer

0

When checking the version of Mysql (5.7) in the source.list and the one of mariaDB (10.1) I noticed that the packages were different (the packages of mariaDB referring to Mysql5.7 + are from 10.2). >

I solved removing the current mariaDB (10.1) and installing another.

sudo apt-get install software-properties-common dirmngr
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://mirror.ufscar.br/mariadb/repo/10.2/debian stretch main'

sudo apt-get update
sudo apt-get install mariadb-server

These settings change according to the OS version, these are for Debian 9 stretch

Sources:

Setting UP MariaDB repos

Dependency problems - leaving unconfigured

    
12.11.2018 / 22:26