mysql 导入sql脚本

释放双眼,带上耳机,听听看~!

C:\Users\Administrator>mysql -u root -p

Enter password: ******
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.6.26-log MySQL Community Server (GPL)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>mysql 导入sql脚本mysql 导入sql脚本

mysql> source e:\android_work\mstx.sql
Query OK, 7 rows affected (0.07 sec)
Query OK, 1 row affected (0.00 sec)
Database changed
Query OK, 0 rows affected (0.01 sec)
Query OK, 0 rows affected (0.02 sec)
Query OK, 0 rows affected (0.02 sec)
mysql> quit
Bye

mstx.sql 内容

drop database mstx;
create database mstx;
use mstx;
create table mstx_head(          /*头像表*/

tid int NOT NULL,             /* 编号 */

tname varchar(50),            /* 头像的名称 */

tdis char(255),                /* 简单的描述 */

tdata blob,                    /*  图片的数据*/

uid int,                     /* 上传者ID */

ttime TIMESTAMP,           /* 上传时间 */

PRIMARY KEY(tid)           /* 设置主键 */

);

commit;

给TA打赏
共{{data.count}}人
人已打赏
安全技术安全运维

Windows服务器如何发现被黑

2018-5-20 12:24:31

安全技术

用node.js做cluster,监听异常的邮件提醒服务

2021-12-21 16:36:11

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索