MySQL5.5.21, mysql5.21
MySQL is required for a recent project. By the way, I have picked up a database that has not been completed for a long time! You may need to write a series of study notes on MYSQL!
When it comes to database installation, it is really anxious! Windows 8 is your own system. If you have installed a circle of servers, you cannot find the best one. The mysql-5.5.21-winx64.msi was found. Finally succeeded!
For detailed installation details, refer to the blog: Learn how to install a database on win8 !!
Show databases; show engines \ Gshow variables like 'have % '; + records + ---------- + | Variable_name | Value | + records + ---------- + | have_compress | YES | have_crypt | NO | have_csv | YES | have_dynamic_loading | YES | have_geometry | YES | | have_innodb | YES | have_ndbcluster | NO | have_openssl | DISABLED | have_partitioning | YES | have_profiling | YES | have_query_cache | YES | have_ssl | DISABLED | | have_symlink | YES | + ---------------------- + ---------- + show variables like 'storgae _ engine % '; [mysqld] # The TCP/IP Port the MySQL Server will listen onport = 3306 # Path to installation directory. all paths are usually resolved relative to this. basedir = "C:/Program Files/MySQL Server 5.5/" # Path to the database rootdatadir = "C: /ProgramData/MySQL Server 5.5/Data/"# The default character set that will be used when a new schema or table is # created and no character set is definedcharacter-set-server = utf8 # The default storage engine that will be used when create new tables whendefault-storage-engine = INNODBhelp contents; help Data Types; e. g. help TIME; Name: 'time' Description: timea time. the range is '-838: 59: 59' to '2014: 59: 59 '. mySQL displays TIMEvalues in 'hh: MM: ss' format, but permits assignment of values to TIMEcolumns using either strings or numbers. URL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-type-overview.htmluse test; create TABLE f_test (a FLOAT (12443.43534534543), B DECIMAL (343243.2343546534636401); INSERT INTO f_test VALUES ); select * from f_test \ G **************************** 1. row ************************** a: 12443.43554687520.000000000000000000000b: 343243.2343546534636401000000000000001 row in set (0.00 sec) create TABLE int_test (num INTEGER); INSERT INTo int_test VALUES (0), (-1), (-1.1), (1.1), (1009888 ); select * from int_test \ G **************************** 1. row *************************** num: 0 **************************** 2. row *************************** num: -1 *************************** 3. row *************************** num: -1 *************************** 4. row *************************** num: 1 **************************** 5. row ************************* num: 10098885 rows in set (0.00 sec) create TABLE bit_test (id BIT (8); # Add the first digit as the decimal number, and the second digit as the binary data insert into bit_test values (11 ), (B '11 '); select id + 0 from bit_test \ G *************************** 1. row ************************** id + 0: 11 **************************** 2. row ************************* id + 0: 32 rows in set (0.00 sec) select BIN (id + 0) from bit_test \ G **************************** 1. row *************************** BIN (id + 0 ): 1011 **************************** 2. row *************************** BIN (id + 0 ): 112 rows in set (0.28 sec) # create table date_test (f_date DATE, f_datetime DATETIME, f_timestamp TIMESTAMP, f_time TIME, f_year YEAR); select CURDATE (); + ------------ + | CURDATE () | + ------------ + | 2015-01-14 | + ------------ + select CURDATE (), NOW (), NOW (), time (NOW ()), year (NOW () \ G **************************** 1. row ************************** CURDATE (): NOW (): 19:39:56 NOW (): 19: 39: 56 time (NOW (): 19: 39: 56 year (NOW (): 20151 row in set (0.00 sec) insert into date_test values (CURDATE (), NOW (), NOW (), time (NOW (), year (NOW ())); select * from date_test \ G **************************** 1. row ************************** f_date: 2015-01-14 f_datetime: 2015-01-14 19: 41: 07f_timestamp: 19:41:07 f_time: 19:41:07 f_year: 20151 row in set (0.00 sec) create TABLE user (id INTEGER, name VARCHAR (20); insert into user values (1, 'bob'), (2, 'petter'); select * from user; + ------ + -------- + | id | name | + ------ + -------- + | 1 | bob | 2 | petter | + ------ + -------- + show tables; + ---------------- + | Tables_in_test | + ---------------- + | bit_test | date_test | f_test | int_table | int_test | user | + ---------------- +