mysql -uexampleuser -ppassword exampledb -B -e "select * from \`person\`;" | sed 's/\t/","/g;s/^/"/;s/$/"/;s/\n//g' > filename.csvThe details on the entry.
Tuesday, June 9, 2009
Exporting mysql table to csv
bawdo2001 had a nice posting Export from MySQL to CSV for exporting data from MySQL to CSV with some shell commands:
Friday, January 16, 2009
Suoramarkkinoinnin yms. estäminen
Puhelinmyyjä keskeytti työnteon jonka seurauksena tuli sitten hetki googleteltua suoramarkkinoinnin estosta ja hillitsemisestä. Muutamia näppäriä tuloksia:
Suomen asiakasmarkkinointiliitto (kiellot koskevat jäsenyrityksiä, joita on kuitenkin jonkin verran):
Bonuksena lisäksi Ajoneuvohallintokeskuksella näyttää olevan myös omia Tietojen luovutuskieltoja
Suomen asiakasmarkkinointiliitto (kiellot koskevat jäsenyrityksiä, joita on kuitenkin jonkin verran):
- ns. Robinson-palvelu: Puhelintarjonnan rajoituspalvelu - liiton palvelunumeroon soittamalla pitäisi liiton jäsenten puhelinmarkkinointi katketa kolmeksi vuodeksi
- ns. Posti-Robinson: Osoitteellisen suoramainonnan rajoituspalvelu - lähettämällä ja täyttämällä postikonttoreista saatava lomake tulisi liiton jäsenten osoitteellinen suoramarkkinointi katketa kolmeksi vuodeksi
Bonuksena lisäksi Ajoneuvohallintokeskuksella näyttää olevan myös omia Tietojen luovutuskieltoja
Friday, January 2, 2009
Handling the SVN version upgrade
The SVN version (and the Berkeley DB used) was changed and the repository (created and used through the old version) didn't work with the new version, printing the following:
With some googling I found the SVN FAQ with following:
Because I could access older version, this was no problem. After that there was still one used db log causing:
and svnadmin recover gave
Help for this was found from SVN repo upgrade HOWTO with following main points:
I quess the dump/load -thing could have worked straight..
svn: DB_VERSION_MISMATCH: Database environment version mismatch
svn: bdb: Program version 4.3 doesn't match environment version
With some googling I found the SVN FAQ with following:
After upgrading to Berkeley DB 4.3 or later, I'm seeing repository errors.
Prior to Berkeley DB 4.3, svnadmin recover worked to upgrade a Berkeley DB repository in-place. However, due to a change in the behaviour of Berkeley DB in version 4.3, this now fails.
Use this procedure to upgrade your repository in-place to Berkeley DB 4.3 or later:
* Make sure no process is accessing the repository (stop Apache, svnserve, restrict access via file://, svnlook, svnadmin, etc.)
* Using an older svnadmin binary (that is, linked to an older Berkeley DB):
1. Recover the repository: 'svnadmin recover /path/to/repository'
2. Make a backup of the repository.
3. Delete all unused log files. You can see them by running 'svnadmin list-unused-dblogs /path/to/repeository'
4. Delete the shared-memory files. These are files in the repository's db/ directory, of the form __db.00*
The repository is now usable by Berkeley DB 4.3.
Because I could access older version, this was no problem. After that there was still one used db log causing:
svnadmin: DB_RUNRECOVERY: Fatal error, run database recovery
svnadmin: bdb: Unacceptable log file /home/pt5337/ltt-svn-fixed/db/log.0000000010: unsupported log version 13
svnadmin: bdb: Invalid log file: log.0000000010: Invalid argument
svnadmin: bdb: PANIC: Invalid argument
svnadmin: bdb: PANIC: DB_RUNRECOVERY: Fatal error, run database recovery
and svnadmin recover gave
svnadmin: Expected FS format '2'; found format '3'
Help for this was found from SVN repo upgrade HOWTO with following main points:
dump the repo with the old version:
$ svnadmin dump old-repos > dumpfile
and load the dump with the new version:
$ svnadmin load myrepos < dumpfile
I quess the dump/load -thing could have worked straight..
Subscribe to:
Posts (Atom)