日期:2014-05-16 浏览次数:20997 次
mysql> SHOW DATABASES;
mysql> CREATE DATABASE MYSQLDATA;
mysql> USE MYSQLDATA; //(按回车键出现Database changed 时说明操作成功!)
mysql> SHOW TABLES;
mysql> CREATE TABLE MYTABLE (name VARCHAR(20), sex CHAR(1));
mysql> DESCRIBE MYTABLE;
mysql> insert into MYTABLE values (”hyq”,”M”);
mysql> LOAD DATA LOCAL INFILE “D:/mysql.txt” INTO TABLE MYTABLE;
mysql>use database; mysql>source d:/mysql.sql;
linux> mysql -usrs -padmin --host=10.10.0.1 -D srstest < /home/test.sql
mysql>drop TABLE MYTABLE;
mysql>delete from MYTABLE;
mysql>update MYTABLE set sex=”f” where name=’hyq’;
mysql> show variables like '%timeout%'; mysql> show variables like '%max_allowed%'; mysql> set wait_timeout = 36000; linux> mysql --help | grep my.cnf