1 1. Enter Password: ******2 2. ues MySQL; using MySQL3 3. show databases; show Database4 4. Use register, using the database name register5 5. Show tables; show tables in the Register database6 6. Describe user, operation on table User:7 8Insert into User (Username,password) VALUES ("XiaoYan","123456"); Insert Data9Insert into User (Username,password) VALUES ("FF","123456"); Insert DataTenDelete fromUserwhereUsername="XiaoYan"; Delete Data OneUpdate userSetUsername="XiaoYan" whereUsername="FF"; Update Data A Select* fromuser; query data - - 7. Quit; launch the 1, displays a list of databases in the current database server: -Mysql>SHOW DATABASES; - Note: MySQL library has the MySQL system information, we change the password and new users, is actually using this library to operate. - 2, display the data tables in the database: +Mysql>Use library name; -Mysql>SHOW TABLES; + 3, display the structure of the data table: AMysql>DESCRIBE table name; at 4, Database creation: -Mysql>CREATE database name; - 5, set up the data table: -Mysql>Use library name; -mysql> CREATE Table table name (field name VARCHAR ( -), Field name CHAR (1)); - 6, delete the database: inMysql>DROP database name; - 7, delete data tables: toMysql>DROP table name; + 8, empty the records in the table: -Mysql>DELETE from table name; the 9, display the records in the table: *Mysql> SELECT *from table name; $ Ten, inserting records into the table:Panax NotoginsengMysql>INSERT into table name VALUES ("HyQ", "M"); - One, update the data in the table: themysql-> UPDATE table name SET field name1= ' A', field name 2= ' B ' WHERE field name 3= ' C'; + A, and load the data into the data table in text mode: Amysql> LOAD DATA LOCAL INFILE "d:/mysql.txt "into table table name; the -, import. sql file command: +Mysql>Use database name; -Mysql> SOURCE d:/Mysql.sql; $ -, command line to modify the root password: $mysql> UPDATE mysql.user SET password=password (' New password ') WHERE user=' root '; -Mysql>FLUSH privileges; - the, display the database name for use: theMysql>SELECT DATABASE (); - -, display the current user:WuyiMysql>SELECT USER (); the
Copy from:http://blog.csdn.net/jack2009win/article/details/6319261
MySQL Database Command Line Client