zeldor.biz

Linux, programming and more

Copyright © 2025
Log in

MySQL output pipe to file

June 7, 2010 by Igor Drobot Leave a Comment

1
SELECT password FROM vb_user INTO OUTFILE '/tmp/pwds.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';

SELECT password FROM vb_user INTO OUTFILE '/tmp/pwds.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';

Filed Under: Linux Tagged With: MySQL, to file

MySQL – Database size

June 6, 2010 by Igor Drobot Leave a Comment

As I know, there are two ways to calculate the MySQL database size:

First one:

1
du -shc /var/lib/mysql/*

du -shc /var/lib/mysql/*

Second one:

1
SELECT table_schema ,SUM( data_length + index_length) / 1024 / 1024 "Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema;

SELECT table_schema ,sum( data_length + index_length) / 1024 / 1024 "Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema;

Filed Under: Bash, Linux, MySQL Tagged With: MySQL

  • « Previous Page
  • 1
  • 2
  • 3
Yeaaah Cookie! We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok