Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Painfully set the sql_mode for vtiger

I couldn't figure out what Vtiger was on about when it asked me to set the php.ini file to error_reporting. Even after the error_reporting had been edited to show;

error_reporting = E_WARNING & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT

The CRM still persists in telling me it requires resetting, no matter how many time I restarted apache with sudo apachectl restart

Anyway...

After moving on, I managed to get to add the database, which at first, looks straight forward, but beware! There's one more huddle to get over before you can successfully install.

You'll probably receive the command to add:

 sql_mode = ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

Big headache!!

firstly, Mac OS X 10.13.* running MySQL mysql-5.7.21-macos10.13-x86_64 doesn't own /my.cnf and if like me, you're MySQL file will probably be stored in usr/local/mysql/bin/.

Stop looking, you wont find it anywhere on your Mac...

But there is light at the end of this tunnel...

like image 397
cjones Avatar asked Mar 09 '26 20:03

cjones


1 Answers

For Ubuntu - Run command:

sudo nano /etc/mysql/my.cnf

Add the following part to the bottom:

[mysqld]

sql_mode=ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

Run command to restart MySQL Service:

sudo service mysql restart

You will also need to change Database Collation to utf8_general_ci in phpmyadmin.

Done !

like image 64
Web Developer in Pune Avatar answered Mar 11 '26 11:03

Web Developer in Pune



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!