1.启动MySQL时一直不成功,查看错误日志 /var/log/mysql/error.log

2.主要的错误信息有如下几条:

[ERROR] InnoDB: mmap(136151040 bytes) failed; errno 12[ERROR] InnoDB: Cannot allocate memory for the buffer pool[ERROR] InnoDB: Plugin initialization aborted with error Generic error[ERROR] Plugin 'InnoDB' init function returned error.[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.[ERROR] Failed to initialize plugins.[ERROR] Aborting

增加swap交换空间解决问题:

dd if=/dev/zero of=/swapfile bs=1M count=1024mkswap /swapfileswapon /swapfile

在文件/etc/fstab中加入 /swapfile swap swap defaults 0 0

service mysql start 启动成功

5. 备注:

生成空文件

dd if=/dev/zero of=1.txt bs=1M count=2 生成一个指定大小的空文件if=文件名:输入文件名of=文件名:输出文件名bs=字节大小count=个数

更多相关文章

  1. android中HttpURLConnection调用getResponseCode()时崩溃 解决方
  2. Android空引用问题的解决方法——on a null object reference
  3. android引入so文件常见问题
  4. android读取assets大于1M文件的解决方法
  5. 几个Android小错误解决方法
  6. Android简单计算器(已消除常见bug)
  7. CheckBox android:paddingLeft 不兼容问题解决方法
  8. Android(安卓)studio 常见错误以及问题
  9. flutter常见问题

随机推荐

  1. 如何使用Web Share API[每日前端夜话0x84
  2. 理解算法的时间复杂度[每日前端夜话0x82]
  3. 高效编写Dockerfile的几条准则
  4. Svelte 3 快速开发指南(对比React与vue)[
  5. React 的未来,与 Suspense 同行[每日前端
  6. Docker Swarm的前世今生
  7. 用Vue.js在浏览器中裁剪图像[每日前端夜
  8. 操作系统分配存储时网络无法正常连接
  9. SpringBoot 中 @SpringBootApplication注
  10. Windows系统设置多用户同时远程登录