The driver has not received any packets from the server.(linux中关于mysql相关命令)

原因:
1、呃呃、重启服务器,没有重新启动mysql;

2、如果还不能连接可能是3306是不允许进行远程连接的,所以在防火墙中设置3306开启远程服务; /sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT

linux中关于mysql相关命令

1、检查MYSQL是否已安装:yum list installed | grep mysql
2、查看mysql安装目录:whereis mysql
3、启动linux服务器中mysql命令:

systemctl start mysqld
systemctl enable mysqld
systemctl status mysqld

3、进入mysql:mysql -uroot -p

the last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
### The error may exist in com/example/finalspringsecurity/mapper/UserMapper.java (best guess)
### The error may involve com.example.finalspringsecurity.mapper.UserMapper.selectOne
### The error occurred while executing a query
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
	at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:92) ~[mybatis-spring-2.0.5.jar:2.0.5]
	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440) ~[mybatis-spring-2.0.5.jar:2.0.5]
	at com.sun.proxy.$Proxy55.selectOne(Unknown Source) ~[na:na]
	at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:159) ~[mybatis-spring-2.0.5.jar:2.0.5]
	at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:90) ~[mybatis-plus-core-3.4.1.jar:3.4.1]
	at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148) ~[mybatis-plus-core-3.4.1.jar:3.4.1]
	at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89) ~[mybatis-plus-core-3.4.1.jar:3.4.1]
	at com.sun.proxy.$Proxy59.selectOne(Unknown Source) ~[na:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_201]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_201]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_201]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_201]
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[spring-aop-5.3.1.jar:5.3.1]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[spring-aop-5.3.1.jar:5.3.1]
	at org.springframework.aop.framework.ReflectiveMethodInvocation<
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
• Table of Contents • Index The Linux® Networking Architecture: Design and Implementation of Network Protocols in the Linux Kernel By Klaus Wehrle, Frank Pählke, Hartmut Ritter, Daniel Müller, Marc Bechler Publisher : Prentice Hall Pub Date : August 01, 2004 ISBN : 0-13-177720-3 Pages : 648 Copyright ii Preface xiii Organization of this Book xiv Additional Sources of Information xv Conventions Used in this Book xvi Acknowledgments xvii Part I: The Linux Kernel 1 Chapter 1. Motivation 3 Section 1.1. The Linux Operating System 4 Section 1.2. What is Linux? 5 Section 1.3. Reasons for Using Linux 6 Chapter 2. The Kernel Structure 9 Section 2.1. Monolithic Architectures and Microkernels 11 Section 2.2. Activities in the Linux Kernel 12 Section 2.3. Locking—Atomic Operations 17 Section 2.4. Kernel Modules 23 Section 2.5. Device Drivers 29 Section 2.6. Memory Management in the Kernel 31 Section 2.7. Timing in the Linux Kernel 35 Section 2.8. The Proc File System 40 Section 2.9. Versioning 43 Part II: Architecture of Network Implementation 45 Chapter 3. The Architecture of Communication Systems 47 Section 3.1. Layer-Based Communication Models 47 Section 3.2. Services and Protocols 52 Chapter 4. Managing Network Packets in the Kernel 55 Section 4.1. Socket Buffers 55 Section 4.2. Socket-Buffer Queues 66 Chapter 5. Network Devices 71 Section 5.1. The net_device Interface 73 Section 5.2. Managing Network Devices 82 Section 5.3. Network Drivers 92 Part III: Layer I + II—Medium Access and Logical Link Layer 115 Chapter 6. Introduction to the Data-Link Layer 117 Section 6.1. Structure of the Data-Link Layer 117 Section 6.2. Processes on the Data-Link Layer 119 Section 6.3. Managing Layer-3 Protocols 127 Chapter 7. The Serial-Line Internet Protocol (SLIP) 132 Section 7.1. Introduction 132 Section 7.2. Slip Implementation in the Linux Kernel 134 Chapter 8. The Point-to-Point Protocol (PPP) 145 Section 8.1. Introduction 145 Section 8.2. PPP Configuration in Linux 148 Section 8.3. PPP Implementation in the Linux Kernel 150 Section 8.4. Implementing the PPP Daemon 158 Chapter 9. PPP over Ethernet 161 Section 9.1. Introduction 161 Section 9.2. PPPOE Specification in RFC 2516 161 Section 9.3. Implementation in the User Space 163 Section 9.4. Implementation in the Linux Kernel 164 Chapter 10. Asynchronous Transfer Mode—ATM 168 Section 10.1. Introduction 168 Section 10.2. Implementing ATM in Linux 169 Section 10.3. Configuration 177 Chapter 11. Bluetooth in Linux 179 Section 11.1. Host Controller Interface (HCI) 181 Section 11.2. L2CAP 185 Section 11.3. Other Protocols 188 Chapter 12. Transparent Bridges 189 Section 12.1. Introduction 189 Section 12.2. Basics 190 Section 12.3. Configuring a Bridge in Linux 199 Section 12.4. Implementation 202 Part IV: Network Layer 221 Chapter 13. The TCP/IP Protocols 223 Section 13.1. The Internet Protocol Suite 224 Chapter 14. The Internet Protocol V4 227 Section 14.1. Properties of the Internet Protocol 228 Section 14.2. Implementing the Internet Protocol 233 Section 14.3. IP Options 250 Section 14.4. Internet Control Message Protocol (ICMP) 262 Chapter 15. Address Resolution Protocol (ARP) 273 Section 15.1. Using the Address Resolution Protocol 274 Section 15.2. The ARP Command 276 Section 15.3. Implementing the ARP Instance in the Linux Kernel 277 Chapter 16. IP Routing 293 Section 16.1. Introduction 293 Section 16.2. Configuration 301 Section 16.3. Implementation 309 Chapter 17. IP Multicast for Group Communication 330 Section 17.1. Group Communication 331 Section 17.2. IP Multicast 333 Section 17.3. Internet Group Management Protocol (IGMP) 339 Section 17.4. Multicast Data Path in the Linux Kernel 345 Section 17.5. Multicasting in Today's Internet 355 Section 17.6. Multicast Transport Protocols 364 Chapter 18. Using Traffic Control to Support Quality of Service (QoS) 366 Section 18.1. Introduction 366 Section 18.2. Basic Structure of Traffic Control in Linux 367 Section 18.3. Traffic Control in the Outgoing Direction 367 Section 18.4. Kernel Structures and Interfaces 369 Section 18.5. Ingress Policing 378 Section 18.6. Implementing a Queuing Discipline 378 Section 18.7. Configuration 381 Chapter 19. Packet Filters and Firewalls 383 Section 19.1. Introduction 383 Section 19.2. The Ipchains Architecture of Linux 2.2 386 Section 19.3. The Netfilter Architecture of Linux 2.4 391 Chapter 20. Connection Tracking 399 Section 20.1. Introduction 399 Section 20.2. Implementation 400 Chapter 21. Network Address Translation (NAT) 410 Section 21.1. Introduction 410 Section 21.2. Configuring NAT in Linux 414 Section 21.3. Implementing the NAT Module 416 Section 21.4. Interfaces to Extend the NAT Module 422 Chapter 22. Extending the Linux Network Architecture Functionality—KIDS 426 Section 22.1. Managing Dynamically Extendable Functionalities 426 Section 22.2. Structure of the KIDS Construction System 428 Section 22.3. Using the KIDS Example to Extend the Linux Network Architecture 431 Chapter 23. IPv6—Internet Protocol Version 6 443 Section 23.1. Introduction 443 Section 23.2. IPv6 Features 443 Section 23.3. IPv6 Implementation 450 Part V: Layer IV—Transport Layer 455 Chapter 24. Transmission Control Protocol (TCP) 457 Section 24.1. Overview 457 Section 24.2. Implementing The TCP Protocol Instance 460 Section 24.3. Connection Management 476 Section 24.4. Protocol Mechanisms For Data Exchange 486 Section 24.5. Timer Management In TCP 508 Chapter 25. User Datagram Protocol (UDP) 513 Section 25.1. Introduction 513 Section 25.2. Data Structures 514 Section 25.3. Sending and Receiving UDP Datagrams 519 Chapter 26. The Concept of Sockets 522 Section 26.1. Introduction 522 Section 26.2. BSD Sockets 522 Section 26.3. Protocol-Specific Sockets 526 Part VI: Layer V—Application Layer 533 Chapter 27. Network Programming With Sockets 535 Section 27.1. Introduction 535 Section 27.2. Functions of the Socket API 538 Section 27.3. Examples 548 Part VII: Appendices 549 Appendix A. The LXR Source-Code Browser 551 Section A.1. Functionality 551 Section A.2. Installation 555 Appendix B. Debugging in the Linux Kernel 557 Section B.1. Log Outputs From the Linux Kernel 557 Section B.2. Creating Strings in the Kernel 561 Section B.3. Information in the /proc Directory 564 Section B.4. Using a Debugger with the Linux Kernel 569 Appendix C. Tools and Commands for Network Operation 572 Section C.1. Using ifconfig to Manage Network Devices 572 Section C.2. Using ping to Test the Reachability 575 Section C.3. Using netstat to View the Network State 576 Section C.4. Using route for Routing Information 578 Section C.5. Using tcpdump for Network Analysis 579 Section C.6. USING traceroute TO TRACE PACKETS 582 Section C.7. Other Tools 584 Appendix D. Example for a Kernel Module 588 Appendix E. Example for a Network-Layer Protocol 591 Appendix F. Example for a Transport Protocol 593 Appendix G. Example for Communication over Sockets 595 Section G.1. SERVER 595 Section G.2. CLIENT 598 Bibliography Index

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值