#1010 – Error dropping database

A database is represented by a directory under the data directory (usually /var/lib/mysql), and the directory is intended for storage of table data. The DROP DATABASE statement will remove all table files and then remove the directory that represented the database. It will not, however, remove non-table files, whereby making it not possible to remove the directory. MySQL […]

Read More

#1101 error in mysql / phpmyadmin

1101 – BLOB, TEXT, GEOMETRY or JSON column ‘answer’ can’t have a default value Probably your development environment allows the defaults and the production environment doesn’t. You can either upgrade your production system or not use that feature. How to disable strict mode in MySQL 5 (Windows): Edit /my.ini and look for linesql-mode=”STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION” Replace it […]

Read More

#2006 – MySQL server has gone away

MySQL/MariaDB related: wait_timeout – Time in seconds that the server waits for a connection to become active before closing it. interactive_timeout – Time in seconds that the server waits for an interactive connection. max_allowed_packet – Maximum size in bytes of a packet or a generated/intermediate string. Set as large as the largest BLOB, in multiples of 1024. Example […]

Read More

ignore time in datetime mysql in select in laravel 8

They do the SQL DATE() work for you, and manage the differences of SQLite. Your result can be achieved as so: Though the above method is convenient, as noted by Arth it is inefficient on large datasets, because the DATE() SQL function has to be applied on each record, thus discarding the possible index. Here are some ways to […]

Read More