Recently do the project need MySQL, by the way to pick up a long time did not get the database! May want to write a series of learning notes about MySQL, that does not come to share with you!
When it comes to installing databases, it's really a worry! Own system is WINDOWS8, installed a lap server but did not find the best, Kung fu is not a conscientious. Found the Mysql-5.5.21-winx64.msi. It finally worked!
For specific installation details, please refer to the blog: Learning database installed on WIN8!!
Show Databases;show engines;show engines \gshow variables like ' have% '; +----------------------+----------+| variable_name | Value |+----------------------+----------+| 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_rtree_keys | YES | | Have_ssl | DISABLED | | Have_symlink | YES |+----------------------+----------+show variables like ' storgae_engine% '; [mysqld]# the TCP/IP Port the MySQL Server would listen onport=3306#path to installation directory. All paths is usually resolved relative to this.basedir= "C:/Program files/mysql/mysql Server 5.5/" #Path to the database ro Otdatadir= "C:/programdata/mysql/mysql SeRVer 5.5/data/"# The default character set that would be used when a new schema or table is# created and no character set I s definedcharacter-set-server=utf8# the default storage engine that'll be used when create new tables Whendefault-storag E-engine=innodbhelp contents;help Data types;e.g.help time; Name: ' Time ' Description:timea time. The range is ' -838:59:59 ' to ' 838:59:59 '. MySQL displays timevalues in ' HH:MM:SS ' format, but permits assignment of values to timecolumns using either strings or Nu Mbers. Url:http://dev.mysql.com/doc/refman/5.5/en/date-and-time-type-overview.htmluse test;create TABLE f_test (a FLOAT ( 38,30), b DECIMAL (38,30)); INSERT into F_test VALUES (12443.43534534543,343243.2343546534636401); select * FROM F_test \g* 1. Row ***************************a:12443.435546875000000000000000000000b:343243.2343546534636401000000000000001 Row in Set (0.00 sec) to 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)); #添加的第一个数字为十进制的数字, The second digit is a binary data insert into bit_test values (one), (b ' one '), and 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): Date_test (0.28 sec) #时间日期的插入学习create table, F_date date,f_ DateTime Datetime,f_timestamp Timestamp,f_time time,f_year); select Curdate (); +------------+| Curdate () |+------------+| 2015-01-14 |+------------+select curdate (), now (), now (), Time (now ()), Year (now ()) \g*************************** 1. Row *************************** curdate (): 2015-01-14 Now (): 2015-01-14 19:39:56 Now (): 2015-01-14 19:39:56time (Now ()): 19:39:56year (Today ()): 20151 row in Set (0.00 sec) inserts into date_test values (Curdate (), now (), now (), Time (now ()), (now ())), select * from Date_test \g*************************** 1. Row *************************** f_date:2015-01-14 f_datetime:2015-01-14 19:41:07f_timestamp:2015-01-14 19:41:07 f_time:19:41:07 f_year:20151 Row in Set (0.00 sec) Create TABLE user (ID integer,name VARCHAR), insert into user V Alues (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 |+----------------+
One of MySQL5.5.21 learning tutorials