VOOZH about

URL: https://rubychallenger.blogspot.com/search/label/mysql

⇱ The Ruby Challenger: mysql


Showing posts with label mysql. Show all posts
Showing posts with label mysql. Show all posts

Wednesday, August 31, 2016

How to install mysql2 gem on Ubuntu

If you are having trouble to install the mysql2 gem, try the following:

# apt-get install build-essential ruby-dev libmysqlclient-dev

Friday, March 7, 2014

LOAD DATA INFILE tips

If you're having troubles with LOAD DATA INFILE ("Errcode 13"):
  • copy the CSV file to the DB folder (/var/lib/mysql/DATABASE), and
  • use the filename only, not the full path.


If you're having troubles with LOAD DATA LOCAL INFILE ("The used command is not allowed with this MySQL version"):
  • temporary solution: mysql -uUSER -p --local-infile DATABASE
  • permanent solution: sudo nano /etc/mysql/my.cnf and insert local-infile under [mysql]; save the file, close the editor and type sudo service mysql restart.

Note: LOAD DATA LOCAL INFILE uses IGNORE. If you want to know why some records were skipped, you must use LOAD DATA INFILE (without LOCAL). (Reference)
Subscribe to: Posts (Atom)