安装数据库:
sudo apt-get install mysql-server
启动服务: sudo service mysql start
连接数据库:sudo mysql -u root -p
执行命令:. test.sql
drop database emp; create database emp default character set utf8; use emp; create table tbl_emp( id int primary key, name varchar(20) not null, dept varchar(20), salary float(8,2) )engine=InnoDB; insert into tbl_emp values(1, '张三','tenich',2000); insert into tbl_emp values(2, '李四','Eng',2100);