MySQL: "LOAD DATA INFILE" says "file not found"
This might be due to AppArmor denying the MySQL server access to most of the filesystem. You can instead use
LOAD DATA LOCAL INFILE ...
to pipe data through the MySQL client, which can read everything the executing user can.
Related cards:
How to load only a subset of a massive MySQL dump
I had a huge MySQL dump that took forever (as in: days) to import, while I actually just wanted to have the full database structure with some data to use on my development machine.
After trying several suggestions on how to speed up slow MySQL du...
Error during Rails 5 upgrade: Environment data not found in the schema
This error is raised because your old database does not have a configured environment yet, which Rails 5 enforces.
If this error occurs while migrating your parallel test databases, make sure to update the parallel_tests
gem first: current vers...
MySQL will not use indexes if you query the wrong data type
When MySQL refuses to use your index, there's a number of things that you may be doing wrong. One of them might be conditions with improper data types.
An example
For example, let's assume you have a users
table with an email
field (`var...
Ubtuntu: "FATAL: Could not load /lib/modules/...-generic/modules.dep: No such file or directory"
If you get this error (probably because you want to load some modules):
# modprobe xt_comment
FATAL: Could not load /lib/modules/3.2.0-40-generic/modules.dep: No such file or directory
The reason could be that apt-get autoremove
al...
Fix for "Rails assets manifest file not found" in Capistrano deploy
If you use webpacker in your Rails application, and you have completely disabled Sprockets, you might get the following error when trying to deploy: Rails assets manifest file not found
. This happens inside the deploy:assets:backup_manifest
t...
How FriendFeed uses MySQL to store schema-less data - Bret Taylor's blog
After some deliberation, we decided to implement a "schema-less" storage system on top of MySQL rather than use a completely new storage system. This post attempts to describe the high-level details of the system.
Webpacker: Loading code on demand
Sometimes you want to load code on demand. For instance, when a a large library is only used on a single screen, this library should only be loaded for that screen. It should not blow up the bundle size for all screens.
You can load code on deman...
Import Excel files without running into memory limitations
There are several gems that make it easy to read and process xlsx files. Parsing the entire file at once however is error-prone since each cell is transformed to a ruby object - sometimes including thousands of formatted but empty cells.
As of...
Change the MySQL default character set on Amazon Relational Database Service (RDS)
Look here for informations how you can show the MySQL default character set.
At first you need the [Amazon RDS Command Line Toolkit](http://docs.amazonwebservi...
MySQL: How to dump single tables instead of a complete database
Sometimes you want to test migrations with production or staging data. Dumping single tables makes sense if a complete dump would be to big.
mysqldump -u deploy_user -p application_production table1 table2 table2 > table1_table2_table2.sql.du...