Just downloaded MySQL 5.0 from the Web, the search graphics tutorial was installed successfully.
1. How to start MySQL at the command line
Start menu, run->cmd;
Startup: net start MySQL
Close: net stop MySQL
2. Go to MySQL
mysql-h hostname-u user name-P, here we enter mysql-hlocalhost-uroot-p can enter MySQL, default no password.
3. Identifiers
The MySQL identifier is not sensitive under Windows, but it is sensitive under the Unix\linux system.
Data type of 4.MySQL
For more information, see: MySQL Data type: http://www.cnblogs.com/zbseoag/archive/2013/03/19/2970004.html
5. Basic Database Operations
Show database; Notice the semicolon at the end
Create database db; Be careful not to write create creat!!! (Oneself old make this low-level mistake)
Use DB
Show tables;
CREATE TABLE student (ID int unsigned NOT NULL auto_increment primary Key,name char (8) Not null,sex char (4) is not NULL);
describe student;
INSERT into student values (null, "Zhang San", "male");
SELECT * from student;
SELECT * from student where id=2;
Update student set sex= "male" where id=2;
ALTER TABLE student change sex age tinyint unsigned not null;
Quit/exit quit MySQL
A new database named DB was created with the above instruction, and a new table named student was created under the database, and some operations were performed on the table, such as inserting, querying, modifying, adding columns, and changing columns. Finally, exit the database.