系统集成MySQL

mysql 在服务器重启后,文件夹丢失导致自启动失败?

系统:CentOS Linux release 7.0.1406
数据库版本:MYSQL 5.7

问题描述:观察发现,每次操作系统重启后,MYSQL的socket目录就没有了,导致数据库无法启动???
目录配置:socket=/var/lock/mysql/mysql.sock,重启后/var/lock目录下mysql就不见了,必须手动添加才能启动数据库,求指点

参与5

2同行回答

renou2012renou2012数据库管理员KE
数据库的日志发下 建议把mysql相关目录全部改成 自定义目录 ,避免该类问题显示全部

数据库的日志发下 
建议把mysql相关目录全部改成 自定义目录 ,避免该类问题

收起
金融其它 · 2019-09-10
xylhldyxylhldy系统工程师成都麦柯
-- 错误日志中只有这些提示信息了,非常感谢,我修改一下socket目录,下班后重启测试一下2019-09-10T00:33:53.468563Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled2019-09-10T00:33:53.468680Z 0 [Note] ...显示全部

-- 错误日志中只有这些提示信息了,非常感谢,我修改一下socket目录,下班后重启测试一下
2019-09-10T00:33:53.468563Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled

2019-09-10T00:33:53.468680Z 0 [Note] /app/mysql/bin/mysqld (mysqld 5.7.23-log) starting as process 26894 ...

2019-09-10T00:33:53.630074Z 0 [Note] InnoDB: PUNCH HOLE support available

2019-09-10T00:33:53.630113Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2019-09-10T00:33:53.630118Z 0 [Note] InnoDB: Uses event mutexes

2019-09-10T00:33:53.630122Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier

2019-09-10T00:33:53.630125Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3

2019-09-10T00:33:53.630132Z 0 [Note] InnoDB: Using Linux native AIO

2019-09-10T00:33:53.631641Z 0 [Note] InnoDB: Number of pools: 1

2019-09-10T00:33:53.631750Z 0 [Note] InnoDB: Using CPU crc32 instructions

2019-09-10T00:33:53.633893Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M

2019-09-10T00:33:53.645352Z 0 [Note] InnoDB: Completed initialization of buffer pool

2019-09-10T00:33:53.647803Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().

2019-09-10T00:33:53.666409Z 0 [Note] InnoDB: Highest supported file format is Barracuda.

2019-09-10T00:33:53.678503Z 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 206427147939

2019-09-10T00:33:53.890043Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 206431504971

2019-09-10T00:33:53.890761Z 0 [Note] InnoDB: Database was not shutdown normally!

2019-09-10T00:33:53.890768Z 0 [Note] InnoDB: Starting crash recovery.

2019-09-10T00:33:53.965369Z 0 [Note] InnoDB: Starting an apply batch of log records to the database...

InnoDB: Progress in percent: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99

2019-09-10T00:33:54.607514Z 0 [Note] InnoDB: Apply batch completed

2019-09-10T00:33:55.080858Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"

2019-09-10T00:33:55.080887Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables

2019-09-10T00:33:55.080934Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...

2019-09-10T00:33:55.111771Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.

2019-09-10T00:33:55.113307Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.

2019-09-10T00:33:55.113326Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.

2019-09-10T00:33:55.114858Z 0 [Note] InnoDB: Waiting for purge to start

2019-09-10T00:33:55.165002Z 0 [Note] InnoDB: 5.7.23 started; log sequence number 206431504971

2019-09-10T00:33:55.166526Z 0 [Note] Plugin 'FEDERATED' is disabled.

2019-09-10T00:33:55.166747Z 0 [Note] InnoDB: Loading buffer pool(s) from /data/mydata/ib_buffer_pool

2019-09-10T00:33:55.188288Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key

2019-09-10T00:33:55.188310Z 0 [Note] Server hostname (bind-address): '*'; port: 7501

2019-09-10T00:33:55.188387Z 0 [Note] IPv6 is available.

2019-09-10T00:33:55.188401Z 0 [Note] - '::' resolves to '::';

2019-09-10T00:33:55.188426Z 0 [Note] Server socket created on IP: '::'.

2019-09-10T00:33:55.193089Z 0 [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.

2019-09-10T00:33:55.193111Z 0 [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.

2019-09-10T00:33:55.193429Z 0 [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.

2019-09-10T00:33:55.193439Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.

2019-09-10T00:33:55.193632Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.

2019-09-10T00:33:55.211756Z 0 [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.

2019-09-10T00:33:55.211783Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.

2019-09-10T00:33:55.315116Z 0 [Note] Event Scheduler: Loaded 0 events

2019-09-10T00:33:55.315316Z 0 [Note] /app/mysql/bin/mysqld: ready for connections.

收起
系统集成 · 2019-09-10
浏览1705

提问者

xylhldy
系统工程师成都麦柯

相关问题

相关资料

相关文章

问题状态

  • 发布时间:2019-09-10
  • 关注会员:2 人
  • 问题浏览:2742
  • 最近回答:2019-09-10
  • X社区推广