Grant all privileges on * * to [e-mail protected] ' 192.168.200.% ' identified by ' Linwei '
Flush privileges;
Grant permissions on the database object. Table to user @ip identified by password
permissions : REPLICATION slace,replication CLIENT
database Object :*. * (*. * Description Database . ) Table name )
user : Shenge1 the % number is a wildcard character , which means that the user relp can 192.168.200.1~192.168.200.254 Service login password : Linwei
Mysql-u shenge1-h 192.168.200.157--password=linwei Login or-p manually enter the password
MySQL < 01.sql = write the MySQL statement in 01.sql and you can do so.
Mysql-u shenge1-h 192.168.200.157--password=linwei < 01.sql
Delete from Mysql.user where user= ' shenge1 '; Delete a user
show databases; display all databases
Show tables from MySQL; Displays all table names in the MySQL database
Create database student; Build a student
drop database student; Delete student databases
CREATE TABLE test.student (name Char,math int); Student table created in database test
drop table test.student; Delete the student table in the test database
Show Columns view table structure from table name or describe table name
Insert into test.student (Name,math) VALUES (' Xiaoming ', 87); Insert data
ALTER TABLE test.student drop name; remove the Name field.
ALTER TABLE Test.student add name (20), add name to this field
Update test.student set name= "Xiaoming" where math=78; updates the value of a data
This article is from the "12208412" blog, please be sure to keep this source http://12218412.blog.51cto.com/12208412/1878028
MySQL Basic basic statement