TablePlus / DBngin

DB Engine
https://dbngin.com
995 stars 19 forks source link

Where to get default my.cnf file, or how to change some mysql modes? #84

Open gindra opened 2 years ago

gindra commented 2 years ago

Hi,

Maybe someone can advise me how to turn of ONLY_FULL_GROUP_BY mode in SQL using this package correctly?

I tried to create my.cnf file with these options sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION and set in MySQL default options input, but when I restarted MySQL it is not even loaded (I think because my config file is not full enough), so I think some examples of default my.conf file would be good in this repository readme to use

jeberly commented 2 years ago

I was having issues where my custom my.cnf seemed to be "not being picked up", but when I examined the error logs found in the dbngin data directory I found my current config had syntax errors and mysqld was failing to start, although dbngin GUI showed it was green.

tail ~/Library/Application\ Support/com.tinyapp.DBngin/Engines/mysql/<your data dir found by right clicking on db and showing file dir>/mysqld.local.err

Here is the simple custom my.cnf I am using

[mysqld]

sql-mode                  = "STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"
default-time-zone    = "+00:00"
port                           = 3306
inf0dr0id commented 10 months ago

Had the same problem when setting sql_mode. The quotes are important here.

[mysqld]
sql_mode = "STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"