mysql restore from dumptop
mysq -u user -p dbname < backupfile.sql
mysqldumptop
mysqldump -u user -p dbname > backupfile.sql
Numeric Typestop
Type Bytes Minimum Value Maximum Value (Signed/Unsigned) (Signed/Unsigned) TINYINT 1 -128 127 0 255 SMALLINT 2 -32768 32767 0 65535 MEDIUMINT 3 -8388608 8388607 0 16777215 INT 4 -2147483648 2147483647 0 4294967295 BIGINT 8 -9223372036854775808 9223372036854775807 0 18446744073709551615
Operatorstop
BETWEEN ... AND ... Check whether a value is within a range of values COALESCE() Return the first non-NULL argument <=> NULL-safe equal to operator = Equal operator >= Greater than or equal operator > Greater than operator GREATEST() Return the largest argument IN() Check whether a value is within a set of values INTERVAL() Return the index of the argument that is less than the first argument IS NOT NULL NOT NULL value test IS NULL NULL value test ISNULL() Test whether the argument is NULL LEAST() Return the smallest argument <= Less than or equal operator < Less than operator LIKE Simple pattern matching NOT BETWEEN ... AND ... Check whether a value is not within a range of values !=, <> Not equal operator NOT IN() Check whether a value is not within a set of values NOT LIKE Negation of simple pattern matching STRCMP() Compare two strings
Statisticstop
# Get lis of all tables with row and length stats. SHOW TABLE STATUS FROM DATABASE_NAME;
String Typestop
CHAR(0-255) VARCHAR(0-255) in version < 5.0.3 VARCHAR(0-65,535) in version > 5.0.3 TINYTEXT(0-255) (8-bit length) TEXT(0-65535) (16-bit length) MEDIUMTEXT(0-16777215) (24-bit length) LONGTEXT(0-4294967295) (32-bit length) BINARY(0-255) VARBINARY(0-255) in version < 5.0.3 VARBINARY(0-65,535) in version > 5.0.3 ENUM type must contain 1 value from a specified list ENUM('yes', 'no') //can contain the following 'yes' 'no' SET Type can contain 0 or more values from a specified list SET('one', 'two') //can contain the following '' 'one' 'two' 'one,two'