cdracars's blog

MySQL Command Line

(Original Post Located @ )This is a list of handy MySQL commands that I use time and time again. At the bottom are statements, clauses, and functions you can use in MySQL. Below that are PHP and Perl API functions you can use to interface with MySQL. To use those you will need to build PHP with MySQL functionality. To use MySQL with Perl you will need to use the Perl modules DBI and DBD::mysql.

Handy SQL Snippets


SET GLOBAL max_allowed_packet=16*1024*1024;


Use this snippet if Drupal is giving you this error: user warning: Got a packet bigger than 'max_allowed_packet' bytes query:



Used to delete all from table... replace "cache" with whatever table you want to delete all entries from.

Unix Commands That Come in Handy

Change permissions Recursively

For chmod and chown you can use the -R option. With -R it is possible to change files and directories recursively.  This will change the permissions of the testfolder and all files and subdirectories inside.

chmod -R 755 /testfolder


File Transfer via SSH

copy from a remote machine to my machine:

scp user@ /me/Desktop/file.txt

copy from my machine to a remote machine:

Git has come.

Today I added Git (the fast version control system) to our server so that I should be able to keep track of code changes.  This involved a few days of research and a ton of trial and error.   The best resource I could find would be  His site had exactly what I needed.

Syndicate content