需求描述: 通过mysql客户端登录到mysql数据库,如何执行操作系统上的SQL脚本文件呢? 操作过程: 1.编写测试脚本文件 [mysql@redhat6 scripts]$ cat SeCount.sql use test01 select count(*) from ts051; 2.登录到mysql数据库中 [mysql@redhat6 scripts]$ mysql -uroot -p Enter password: Welcome to the MySQL monitor. Com…
用notepad++编写好一个.sql脚本文件: drop database if exists library; create database library default character set utf8; use library; create table user( id ) not null auto_increment, name ) default null, password ) default null, primary key (id) )engine=innodb…