This is for the mysql binary that was installed using dmg file. Show Sample Output
options "sleep" in seconds "--verbose" show "full" processlist Show Sample Output
Useful command for MySQL Show Sample Output
error out to a different file every day if it is part of a cron entry. The backup file will overwrite older version.
queries related to table 'Invoice_template' Show Sample Output
remove all files in /home/ folder that starts with bk_all_dbProdSlave and not created in the last 2 days
username is dba and password is dba123
cron entry to record mysql status every minute
This command works only if the line "DROP TABLE IF EXISTS" exists for all tables in the mysqldump file. It acts like a state machine.
Be aware of using the --password argument as it will appear your password in plain text on the screen. You may use -p argument instead, it will prompt you to enter you password in hidden mode.
`tar xfzO` extracts to STDOUT which got redirected directly to mysql. Really helpful, when your hard drive can't fit two copies of non-compressed database :)
Create a secure tunnelled connection for access to a remote MySQL database. For example, connect with MySQL Workbench to root@127.0.0.1:13306. Show Sample Output
Convert all Tables from MyISAM to InnoDB
Given a dump.sql file, extract table1 creation and data commands. table2 is the one following table1 in the dump file. You can also use the same idea to extract several consecutive tables.
mtop allows you to monitor the operation of a MySQL application in real time. See, among the high, the number of queries performed per second, slower queries, the number of active processes. To install on Ubuntu sudo apt-get-y install mtop
You can get an approximate idea of how long your data export might take. Show Sample Output
This will show the locations, in order of preference, that MySQL will look for a configuration file Show Sample Output
Useful for monitoring both MySQL and the server load at the same time.
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: