• L004-oldboy-mysql-dba-lesson04


     
     

     

     

    L004-oldboy-mysql-dba-lesson04

     

     

     

     

    说明: D:我的文档My Knowledge	emp2ad681d-37ca-4367-892e-f3245434ae56_128_filesclip_image001801e5b35-dc6f-46e3-b67a-32a476b44c68.jpg

     

    说明: D:我的文档My Knowledge	emp2ad681d-37ca-4367-892e-f3245434ae56_128_filesclip_image00282d7af40-1d43-4a57-8ed6-03038b5840e0.jpg

     

     

     说明: D:我的文档My Knowledge	emp2ad681d-37ca-4367-892e-f3245434ae56_128_filesclip_image004ce1fc43d-ba6c-451e-9c08-03cd5e0f50f9.jpg

    说明: D:我的文档My Knowledge	emp2ad681d-37ca-4367-892e-f3245434ae56_128_filesclip_image00536d93b64-a231-4c54-b42e-2aa43c1e41b5.jpg

    说明: D:我的文档My Knowledge	emp2ad681d-37ca-4367-892e-f3245434ae56_128_filesclip_image006b3d3cb69-ac4b-4c60-a8b2-d3b06366d988.jpg

     

    说明: D:我的文档My Knowledge	emp2ad681d-37ca-4367-892e-f3245434ae56_128_filesclip_image00807d0e20f-d2f4-4aad-80ff-fee905357b01.jpg

    说明: D:我的文档My Knowledge	emp2ad681d-37ca-4367-892e-f3245434ae56_128_filesclip_image0099f3386e3-57a9-4052-8d91-03b5a97cdc1a.jpg

     

     

    说明: D:我的文档My Knowledge	emp2ad681d-37ca-4367-892e-f3245434ae56_128_filesclip_image01199686a13-900c-494b-9037-9deae24a6653.jpg

    说明: D:我的文档My Knowledge	emp2ad681d-37ca-4367-892e-f3245434ae56_128_filesclip_image012c45e449b-adb8-4c66-893b-683e3e36a449.jpg

    说明: D:我的文档My Knowledge	emp2ad681d-37ca-4367-892e-f3245434ae56_128_filesclip_image01338581010-5d68-4139-af63-775bdd2d9e20.jpg

     

     

    说明: D:我的文档My Knowledge	emp2ad681d-37ca-4367-892e-f3245434ae56_128_filesclip_image01576e58ac8-2572-4e64-8a49-f6c56bab9355.jpg

    说明: D:我的文档My Knowledge	emp2ad681d-37ca-4367-892e-f3245434ae56_128_filesclip_image0175556aee8-7d76-4fa2-a66b-d2dc32e6ea63.jpg

     

     

     

     

    说明: D:我的文档My Knowledge	emp2ad681d-37ca-4367-892e-f3245434ae56_128_filesclip_image0186d6df32a-c114-4d25-89b6-6c7e0901dc7a.png

    说明: D:我的文档My Knowledge	emp2ad681d-37ca-4367-892e-f3245434ae56_128_filesclip_image01915665ad3-b08c-4da8-a858-b71896617093.png

    说明: D:我的文档My Knowledge	emp2ad681d-37ca-4367-892e-f3245434ae56_128_filesclip_image02159213c24-9b64-4966-b73b-8839d8bb7b0c.jpg

     

     

    说明: D:我的文档My Knowledge	emp2ad681d-37ca-4367-892e-f3245434ae56_128_filesclip_image0232b603099-d419-4320-9379-f108f884781a.jpg

    说明: D:我的文档My Knowledge	emp2ad681d-37ca-4367-892e-f3245434ae56_128_filesclip_image025f4286f6d-479d-4d18-aab3-b66cbeac559b.jpg

     

    说明: D:我的文档My Knowledge	emp2ad681d-37ca-4367-892e-f3245434ae56_128_filesclip_image027821c6c0d-dde2-4478-b042-49fca3db71ce.jpg

     

    说明: D:我的文档My Knowledge	emp2ad681d-37ca-4367-892e-f3245434ae56_128_filesclip_image029802b695f-d17c-4e6b-9c4b-eb7bbd4a20f0.jpg

     

    说明: D:我的文档My Knowledge	emp2ad681d-37ca-4367-892e-f3245434ae56_128_filesclip_image03079fe351b-8b0e-4499-8d75-93021cb6c33c.png

     

     

     [root@web01 mysql]# mysql -uroot -ptestpassword -S /tmp/mysql.sock

    mysql> select inet_aton('192.168.1.200');

    +----------------------------+

    | inet_aton('192.168.1.200') |

    +----------------------------+

    |                 3232235976 |

    +----------------------------+

    1 row in set (0.00 sec)

     

    mysql> select inet_aton('192.168.1.200');

    +----------------------------+

    | inet_aton('192.168.1.200') |

    +----------------------------+

    |                 3232235976 |

    +----------------------------+

    1 row in set (0.00 sec)

     

    mysql> create database mydb;

    use mydb;create table ip(ip int);

    insert ip values(inet_aton('192.168.1.200'));

    mysql> insert ip values(inet_aton('192.100.2.22'));

    insert ip values(inet_aton('172.16.32.15'));

    insert ip values(inet_aton('200.100.2.22'));

    insert ip values(inet_aton('200.100.2.100'));

    insert ip values(inet_aton('200.100.3.150'));

     

    mysql> select * from ip;

    +------------+

    | ip         |

    +------------+

    | 2147483647 |

    | 2147483647 |

    | 2147483647 |

    | 2147483647 |

    | 2147483647 |

    | 2147483647 |

    +------------+

    6 rows in set (0.00 sec)

     

     

     

     

     

     

     

     

     

     

     

    mysql> create databases mydb;

    use mydb;

     

    create table ip_info(

    id int unsigned not null auto_increment,

    userid int unsigned not null,

    username varchar(100) default '',

    ip int unsigned not null,

    ctime timestamp default current_timestamp on update current_timestamp,

    primary key(id),

    index username(username),

    index userid(userid),

    index ip(ip)

    );

     

    show create table ip_info;

     

     

    insert into ip_info(userid,username,ip) values(11,'aa',inet_aton('192.168.1.10'));

    select * from ip_info;

     

     

     

     

     

     

     

     

     

     

    1.记录慢查询里面的有三种语句,除了这个还可能是没有使用上索引,以及DML操作语句。
    2.
    此变量是动态变量,可以在线设置,设置要是基于session的话,可能会导致不生效,设置为global的话,如果连接不断开也会出现不马上生效的情况。

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     
     
     
     





    附件列表

  • 相关阅读:
    POJ-3176 Cow Bowling
    01背包、完全背包、多重背包
    最后的几天暑假学习
    暑假的学习
    凸包算法(Graham扫描法)详解
    微软版的SqlHelper.cs类
    SQL语句分组排序,多表关联排序
    SQL存储过程分页(通用的拼接SQL语句思路实现)
    增加删除字段修改字段名,修改表结构,非常用SQL语句技巧总结
    Asp.net mvc返回Xml结果,扩展Controller实现XmlResult以返回XML格式数据
  • 原文地址:https://www.cnblogs.com/bolinzhihua/p/5650782.html
Copyright © 2020-2023  润新知