This command will read a CSV file, and display it as columns. This also works on Windows if you have Cygwin installed.
column -t -s"," test.csv
You are currently browsing the archives for the Systems category.
This command will read a CSV file, and display it as columns. This also works on Windows if you have Cygwin installed.
column -t -s"," test.csv
Tags: columns, command, csv, display, file
Posted in Code, Systems | No Comments »
I can now resolve things on my Raspberry Pi (Raspbian) thanks to a helpful post here: http://www.softwarepassion.com/solving-dns-problems-with-openvpn-on-ubuntu-box/
Posted in Systems | No Comments »
mysqldump --no-create-info -uxxxx -pxxxx Database ATable | gzip -9 > xxxx.sql.gz
zcat xxxx.sql.gz | mysql -uxxxx -pxxxx Database
Tags: admin, backup, cli, command, dump, linux, mysql, mysqldump, restore, server, sysadmin, zcat
Posted in Code, Systems | No Comments »
Sometimes you need a quick way to find out what foreign key is blocking your action.
[code]SELECT
CONCAT(table_name, ‘.’, column_name) AS ‘foreign key’,
CONCAT(referenced_table_name, ‘.’, referenced_column_name) AS ‘references’
FROM information_schema.key_column_usage
WHERE referenced_table_name IS NOT NULL;[/code]
http://www.conandalton.net/2008/09/list-foreign-key-constraints-in-oracle.html
Posted in Code, Systems | No Comments »
This week, I ran into a problem when I was profiling that didn’t seem to be very well documented anywhere. I was trying to profile a query that included a view. The error message that I got when I tried to execute my EXPLAIN was: “EXPLAIN/SHOW can not be issued; lacking privileges for underlying table”
After a lot of flailing out, me and the DBA for this project figured out that in order to be able to execute my EXPLAIN, I needed to have SELECT on the key columns that I was using in my query for the table behind the view. Simple enough, but not something made easy to figure out.
Hopefully this helps someone else figure this out faster.
Happy hunting!
Tags: database, dba, explain, mysql, permissions, profiling, query, sysadmin
Posted in Code, Systems | No Comments »