VPS侦探论坛

 找回密码
 注册
搜索
查看: 101|回复: 4

mysql数据目录下 .err .pid 文件如何修改

[复制链接]
发表于 2019-7-11 00:19:09 | 显示全部楼层 |阅读模式


请问我事先将 /usr/local/mysql/var/ 备份了一份到宿主机,然后使用docker 挂载 目录var 到容器中,发现MySQL服务启动不了,查看 /usr/local/mysql/var/ 下没有.err .pid文件(或者重新生产了新的文件名)



请问这两个文件可以修改位置吗?或者又其他好办法可以将数据库目录挂载的宿主机的,谢谢老大。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
美国VPS推荐: 遨游主机LinodeLOCVPSKVMLAVPS2EZ搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2019-7-11 08:49:13 | 显示全部楼层



和err、pid没任何关系,mysql都没发启动肯定没pid文件

按反馈必读反馈信息
美国VPS推荐: 遨游主机LinodeLOCVPSKVMLAVPS2EZ搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2019-7-11 16:54:38 | 显示全部楼层



licess 发表于 2019-7-11 08:49
和err、pid没任何关系,mysql都没发启动肯定没pid文件

按反馈必读反馈信息

root@6c2706d3986c:/usr/local/mysql/var# vim 6c2706d3986c.err
2019-07-11T08:30:12.853486Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2019-07-11T08:30:12.853495Z 0 [Note] Shutting down plugin 'InnoDB'
2019-07-11T08:30:12.853648Z 0 [Note] InnoDB: FTS optimize thread exiting.
2019-07-11T08:30:12.853821Z 0 [Note] InnoDB: Starting shutdown...
2019-07-11T08:30:12.954180Z 0 [Note] InnoDB: Dumping buffer pool(s) to /usr/local/mysql/var/ib_buffer_pool
2019-07-11T08:30:12.954651Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 190711  8:30:12
2019-07-11T08:30:14.944072Z 0 [Note] InnoDB: Shutdown completed; log sequence number 4628965
2019-07-11T08:30:14.947010Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2019-07-11T08:30:14.947030Z 0 [Note] Shutting down plugin 'MEMORY'
2019-07-11T08:30:14.947041Z 0 [Note] Shutting down plugin 'CSV'
2019-07-11T08:30:14.947050Z 0 [Note] Shutting down plugin 'sha256_password'
2019-07-11T08:30:14.947056Z 0 [Note] Shutting down plugin 'mysql_native_password'
2019-07-11T08:30:14.947236Z 0 [Note] Shutting down plugin 'binlog'
2019-07-11T08:30:14.951300Z 0 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

2019-07-11T08:30:16.632891Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2019-07-11T08:30:16.632996Z 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.7.26) starting as process 1180 ...
2019-07-11T08:30:16.670568Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-07-11T08:30:16.670647Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-07-11T08:30:16.670655Z 0 [Note] InnoDB: Uses event mutexes
2019-07-11T08:30:16.670663Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-07-11T08:30:16.670670Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-07-11T08:30:16.670677Z 0 [Note] InnoDB: Using Linux native AIO
2019-07-11T08:30:16.671200Z 0 [Note] InnoDB: Number of pools: 1
2019-07-11T08:30:16.671346Z 0 [Note] InnoDB: Using CPU crc32 instructions
2019-07-11T08:30:16.673857Z 0 [Note] InnoDB: Initializing buffer pool, total size = 1G, instances = 8, chunk size = 128M
2019-07-11T08:30:16.755279Z 0 [Note] InnoDB: Completed initialization of buffer pool
2019-07-11T08:30:16.773436Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2019-07-11T08:30:16.787585Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2019-07-11T08:30:16.854614Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-07-11T08:30:16.854839Z 0 [Note] InnoDB: Setting file '/usr/local/mysql/var/ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-07-11T08:30:17.028899Z 0 [Note] InnoDB: File '/usr/local/mysql/var/ibtmp1' size is now 12 MB.
2019-07-11T08:30:17.030721Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2019-07-11T08:30:17.030754Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2019-07-11T08:30:17.031738Z 0 [Note] InnoDB: 5.7.26 started; log sequence number 4628965
2019-07-11T08:30:17.031981Z 0 [Note] InnoDB: Loading buffer pool(s) from /usr/local/mysql/var/ib_buffer_pool
2019-07-11T08:30:17.032378Z 0 [Note] Plugin 'FEDERATED' is disabled.
2019-07-11T08:30:17.036484Z 0 [Note] InnoDB: Buffer pool(s) load completed at 190711  8:30:17
2019-07-11T08:30:17.037360Z 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-07-11T08:30:17.037396Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2019-07-11T08:30:17.037475Z 0 [Note] IPv6 is available.
2019-07-11T08:30:17.037494Z 0 [Note]   - '::' resolves to '::';
2019-07-11T08:30:17.037538Z 0 [Note] Server socket created on IP: '::'.
2019-07-11T08:30:17.067821Z 0 [Note] Failed to start slave threads for channel ''
2019-07-11T08:30:17.079199Z 0 [Note] Event Scheduler: Loaded 0 events
2019-07-11T08:30:17.079557Z 0 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.7.26'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
2019-07-11T08:34:01.824634Z 2 [Warning] IP address '172.17.0.1' could not be resolved: Name or service not known
"6c2706d3986c.err" 133L, 11525C                                                                                   

美国VPS、VPN、域名代购:http://shop63846532.taobao.com/

 楼主| 发表于 2019-7-11 17:03:56 | 显示全部楼层



本帖最后由 apmsoso 于 2019-7-11 17:06 编辑
licess 发表于 2019-7-11 08:49
和err、pid没任何关系,mysql都没发启动肯定没pid文件

按反馈必读反馈信息

你好,我容器启动时候nginx,mysql,php 都没有自动开启,需要手动start可以启动,并且mysql 生成了一个新pid文件(图一),但是我把数据库var mv 到另一个地方,然后 ln -s 过来 再重启,报错了(图2),新生成的pid 也没有了,日志文件如上。谢谢(图一)  (图2)

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org/
发表于 2019-7-11 20:13:30 | 显示全部楼层



apmsoso 发表于 2019-7-11 17:03
你好,我容器启动时候nginx,mysql,php 都没有自动开启,需要手动start可以启动,并且mysql 生成了一个新p ...

提供的日志只是部分的,发出的部分没有错误信息
pid名字本来就是根据机器名而定的
你直接拷贝数据库目录也是可能会造成损坏

美国VPS、VPN、域名代购:http://shop63846532.taobao.com/

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2019-7-22 06:09 , Processed in 0.202910 second(s), 27 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表