Come esportare una tabella MySQL in csv

Cosa facile facile …

mysql -u[username] -p[password] [nome_database] -B -e “select * from \`[nome_tabella]\`;” | sed ‘s/\t/”,”/g;s/^/”/;s/$/”/;s/\n//g’ > /var/www/html/mysql_exported_table.csv

  1. No trackbacks yet.

Lascia un Commento

Fill in your details below or click an icon to log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Log Out / Modifica )

Foto Twitter

You are commenting using your Twitter account. Log Out / Modifica )

Foto di Facebook

You are commenting using your Facebook account. Log Out / Modifica )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 32 other followers