Page 1 of 1

JSON-Extract does not exist error message after new install.

Posted: Tue Jan 16, 2024 4:46 pm
by liam
Hi I have installed nubuilder and everything looks ok, however if I click on sessions nothing is listed.
I look in the debug results and get the following:

SQLSTATE[42000]: Syntax error or access violation: 1305 FUNCTION tpw.JSON_EXTRACT does not exist

===SQL===========

SELECT zzzzsys_session_id,login_time,login,user,ip
FROM ( SELECT zzzzsys_session_id, TRIM(BOTH '"' FROM JSON_EXTRACT(sss_access, '$.session.zzzzsys_user_id')) AS login, NULL AS user, sss_login_time AS login_time, TRIM(BOTH '"' FROM JSON_EXTRACT(sss_access, '$.session.ip_address')) AS ip FROM zzzzsys_session
WHERE TRIM(BOTH '"' FROM JSON_EXTRACT(sss_access, '$.session.global_access')) = '1' UNION ALL SELECT zzzzsys_session_id AS ses_id, sus_login_name AS login, sus_name AS name, sss_login_time AS login_time, TRIM(BOTH '"' FROM JSON_EXTRACT(sss_access, '$.session.ip_address')) AS ip FROM zzzzsys_user JOIN zzzzsys_session WHERE zzzzsys_user_id = TRIM(BOTH '"' FROM json_extract(sss_access, '$.session.zzzzsys_user_id')) AND TRIM(BOTH '"' FROM json_extract(sss_access, '$.session.global_access')) = '0' ) T WHERE (1)
ORDER BY login_time DESC LIMIT 0, 20

===BACK TRACE====

Has anybody else seen this

Re: JSON-Extract does not exist error message after new install.

Posted: Tue Jan 16, 2024 6:37 pm
by kev1n
Hi,

Ensure that the database you are using with nuBuilder supports the JSON_EXTRACT function. Not all databases have the same syntax for handling JSON data.

The JSON_EXTRACT function is available in MySQL starting from version 5.7.8. If you are using a version prior to 5.7.8, you won't have access to this function. Therefore, if you're encountering issues related to JSON_EXTRACT and your MySQL version is older, consider upgrading to a version that supports it.

Re: JSON-Extract does not exist error message after new install.

Posted: Wed Jan 17, 2024 12:07 pm
by liam
Ok thanks I will look into how to upgrade from 5.5.68 to 5.7.8.