Tagged With: MySQL
Export MySQL data to CSV
Melakukan export data MySQL ke CSV sangat mudah di lakukan melalui CLI (Command Line Interface), untuk langkah ini kita mempunya 2 cara, tinggal pilih saja mana yang menurut Anda gampang dilakukan. Langkah 1: select columns INTO OUTFILE ‘/path/to/output.csv’ FIELDS TERMINATED BY ‘,’ OPTIONALLY ENCLOSED BY ‘”‘ LINES TERMINATED BY ‘n’ from table [where clause] Langkah … Continue reading
Exporting Data with the SELECT … INTO OUTFILE Statement
Berikut syntax untuk membatu dalam melakukan dump database, tetapi kita dapat menentukan field-filed yg kita butuhkan, dengan menggunakan SELECT dengan INTO OUTFILE output_file. Ikuti langkah berikut ini untuk mengexport table data_tbl ke dalam file data.txt. mysql> SELECT * FROM data_tbl -> INTO OUTFILE ‘/tmp/data.txt’; Output dari perintah diatas akan membuat file /tmp/data.txt. Jika ingin outpunya … Continue reading
Remove MySQL Binary Log Files Eating Lots of Disk Space
By default, MySQL 5.0 and above enables MySQL Binary Log. Keeping MySQL Binary Log might take up a lot of disk space for long run. Older MySQL Binary log can be removed in order to keep your hard disk space free. MySQL Binary Log stores query event such as add, delete and update in a … Continue reading
Repair MySQL Replication Duplicate Entry Error
We have 2 servers that will be configured as Circular Replication. It means both servers act as master and slave to another server. And Master server was going down because hardware failure and need restart Master server. When Master server is going up, repication with slave is not running. Check replication on slave mysql> SHOW … Continue reading
mysql : Got error 127 from storage engine
Duh.. udah sore di telp pula dari client.. katanya a** monitoringnya gajalan, selidik punya selidik ternyata mysql keluarin error “Got error 127 from storage engine” gw pikir cuma tablenya aja yang rusak, so tinggal repair table aja. Tapi setelah dijalanin lagi applikasinya masih tetap mysqlnya keluarin error “Got error 127 from storage engine” dan akhirnya … Continue reading