Quote:
Originally Posted by Dido AskJolene
What Barry said...  LOAD DATA INFILE is very quick - but you have to have shell access.
With regards to the date splitting, using a regexp is ok - however I think just using explode() will/can be quicker. Especially for something this trivial, it doesn't really require a regexp.
|
Got root? bash
cron a bash script to do this?
I have never done this but I found this as a protype ...
Code:
#!/bin/bash
P=password
D=database
U=username
mysql -u$U -p$P <<< 'alter database '$D' default character set utf8;'
mysql -u$U -p$P -D$D <<< 'show tables;' | while read x; do mysql -u$U -p$P\
-D$D <<< 'alter table '$x' convert to character set utf8;'; done