MySql installation
MySQL is a way to store data, but also data persistence saved
persistently saved There are many solutions: database ... and so
on cache Question: server and client
server is a database
client has a cookie and some, but customers end relatively not very safe, but also to see what the specific needs
windows install MySQL:
to download the installation package, note the version 5. * version on the line, .msi suffix (that is, the installation package), and finally it is the environment variables!
generally using the integrated environment on the line, I now use is: https://www.xp.cn/ phpStudy, then you can start MySQL;
MySql operation
Use the command line 1. 2. 3 graphical user codes operation command line: Note semicolon; { DDL the DML the DCL DTL; DDL: The operation of the database, create a database, creating tables, delete tables, databases are deleted DDL DML (emphasis): operating data, add, delete, change, DCL: permissions DTL: transactional operations } { graphical user: { software: navicat download and install tutorial addresses (hack): HTTP: // www.downcc. COM / Soft / 322714.html } { 1. database link -> provided state database is open, phpStudy in the MySQL (run) may be used; New link: a connection name, host, port, user name, password, the connection name: display name host: localhost port: 3306 (default) Username: root (default) Password: password to view phpstudy in MySQL connection is successful, see a lot of tables, there is a default MySQL table, under normal circumstances do not recommend changes to these tables excel spreadsheet and also as general cases, for a project there is a database, a database and then there are more tables we can create some tables and databases (right) in the software inside 2 New database. right New: database name, character set, collation database name: node_js (nickname) character set : utf8 collation: utf8_general_ci (support Chinese encoding) 3 . Create the table in just a database, right-New table 1 field: that is, the horizontal axis those content name, type, length, decimal point is not null (not empty), key (automatic growth) unique identifier: every table needs to have one, that is, to distinguish the meaning of (id) because the data is no unity, there will be the same such as name, password, also have the same type: int : range: 0 ... concerning the type of it, moderate on the line, the maximum and minimum difference is performance issues, space fields: id, type, length, decimal point is not null, the key the above mentioned id int 11 0 to true (√) primary key (automatic growth) username VARCHAR 50 Age int 11 Sex tinyint 1 (Note: male: 1 female: 0 ) save: the Users } }