Keep forgetting this. Replace a string in all rows:
UPDATE <table> SET <column> = REPLACE(<column>, '<string to find>', '<string to replace>');
Keep forgetting this. Replace a string in all rows:
UPDATE <table> SET <column> = REPLACE(<column>, '<string to find>', '<string to replace>');
Because I keep forgetting it: ALTER TABLE the_table AUTO_INCREMENT= 0
Run from mysql program with FILE privileges or it won’t work.
LOAD DATA LOCAL INFILE '/importfile.csv' INTO TABLE test_table FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (field1, filed2, field3);
Note: Path needs to be absolute
A nice replacement for the ageing, unmaintained cocoaMySQL that I like to use: Sequel Pro. Same features, better look and is maintained.
I’d recommend CocoaMySQL for the Mac above the official ones, simply for the fact that CocoaMySQL doesn’t crash so often. It’s old though, so I’d get version 0.7b, the beta, which works.