Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Variable 'sql_mode' can't be set to the value of 'REPLACE

I don't know why but suddenly I getting the following error.

Till now it is working fine but today it will produce the following error enter image description here

it is working fine when I test to the local server but when I uploaded to 000webhost server it will produce an error

Variable 'sql_mode' can't be set to the value of 'REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE( @@sql_mode' SELECT vValue FROM configurations WHERE eStatus = 'Active' AND vName = > 'PAGE_DATA_LIMIT' ORDER BY iSettingId DESC

At Filename: core/MY_Model.php all code is working fine there is no error on Line Number: 94 which is displayed

like image 940
TarangP Avatar asked Aug 06 '19 11:08

TarangP


People also ask

Can't be set to the value of NO_AUTO_CREATE_USER?

How would one fix this? if you have access to the sed utility, try this command: sed -i 's/NO_AUTO_CREATE_USER//' mysqldump. sql to remove the "NO_AUTO_CREATE_USER" text from your dump file, and replace it with nothing. @pbnelson you should grep for NO_AUTO_CREATE_USER before you do this.

What is set sql_mode No_auto_value_on_zero?

SET SQL_MODE=”NO_AUTO_VALUE_ON_ZERO”; happens when different version of mysql is being used. When you are transfering from one server to another you should keep in mind the versions of database use in a new environment especially the mysql.

What is sql_mode?

In MySQL 4.0, a server SQL mode system variable named sql_mode was introduced to allow configuring certain aspects of how the server executes SQL statements. Initially, this variable could be set only by means of the --sql-mode startup option. As MySQL 4.1.

How do I permanently change SQL mode in MySQL?

If you are using Windows Operating System, check your directory my. cnf or my. ini file. sql_mode="TRADITIONAL".


Video Answer


1 Answers

Open file config/database.php and change value's variable stricton to be 'TRUE'

'stricton' => TRUE,
like image 175
Dariswan Janweri P. Avatar answered Oct 07 '22 02:10

Dariswan Janweri P.