Mysql command 1 in Linux: mysql can directly access the mysql command line. 2. For mysql database operations, you must first log on to mysql. All related operations are performed at the mysql prompt. Each Command ends with a semicolon www.2cto.com 1 and displays the Database List. Show databases; 2. display the data table in the database: use mysql; // open the database show tables; 3. display the data table structure: describe table name; 4. create database name; 5. create a table: use database Name; create table Name (field setting list); 6. delete database and table: drop database name; drop table name; 7. Clear the records in the Table: delete from table name; 8. display the records in the Table: select * from table name; 9. Modify the encoding if you want to change the encoding format of mysql: when mysql is started, add the -- default-character-set = gbk to the mysqld_safe command line.
To change the encoding format of a database: Enter the alter database db_name default character set gbk command at the mysql prompt;