美文网首页
linux系统中常用MySQL命令

linux系统中常用MySQL命令

作者: linyaDu | 来源:发表于2022-03-22 14:43 被阅读0次

    1、在终端中进入MySQL:

    mysql -uroot -p   //本地的mysql   远程的我没用过
    

    2、显示、创建、使用、删除 数据库

    show databases;               //显示
    create database databasename;      //创建
    use databesename                  //使用
    drop database databasename;        //删除
    

    3、显示、查询、更新、删除 表格

    show tables;            //显示全部表格
    select * from 表名 where id>0;   //查询
    insert into 表名 (DataType,MicroF1) values("1TD","0.951975"),("2TS","0.992911");   //插入多行数据
    truncate 表名;   //整体删除(速度较快)
    delete from 表名;//逐条删除(速度较慢)  可加上where语句
    
    向表中插入数据的例子thesis:
    insert into webui_backbone_classify_performance (DataType,MicroF1,AvgFPR,AvgFNR,TrainTime) values("1TD","0.951975","0.015174","0.058948","19.9"),("2TS","0.992911","0.004098","0.001432","6.5"),("3UD","0.933406714","0.003430208","0.034773469","1.1"),("4US","0.913237311","0.003570474","0.044474702","1.2");
    
    Project固定的分类信息:
    insert into webui_backbone_classify_performance(DataType,BlockSize,MicroF1,AvgFPR,AvgFNR,Time,AoLP) values("双向TCP流", "2", "95.1", "0.9", "6.2","144.3","98.4"),("单向TCP流","2","98.5","0.1","0.6","54.9","98.0"),("双向UDP流","2","95.8","0.2","2.3","1.8","94.1"),("单向UDP流","2","96.0","0.2","2.5","2.9","96.1");
    
    

    相关文章

      网友评论

          本文标题:linux系统中常用MySQL命令

          本文链接:https://www.haomeiwen.com/subject/hgyfjrtx.html