lnmp 1.3 下。不管是将 mysql 的 4G 的那个文件还是 1-2G 的.cnf 文件 CP 到 /etc 目录下。mysql 重启就启动不了。换回装完 LNMP 的 my.cnf 就好使。

2017-02-14 22:18:56 +08:00
 cnmt

mysql 5.548

2064 次点击
所在节点    Linux
6 条回复
fei31976
2017-02-14 22:56:54 +08:00
配置文件里涉及到目录, log 文件大小之类的参数,不是说改就能改的
cnmt
2017-02-15 08:57:51 +08:00
@fei31976 对比了。 。装完 LNMP 的 my.cnf 和 4G 的那个 my.cnf
在 4G 的 my.cnf 里没有如下内容。。。。。。。。。。。。。。。。。。装完 LNMP 的 my.cnf 里确有。
datadir = /usr/local/mysql/var
innodb_data_home_dir = /usr/local/mysql/var
realpg
2017-02-15 13:31:12 +08:00
珍爱生命远离套件
cnmt
2017-02-15 19:54:02 +08:00
在启动不成功时。看日志。确没有启动不成的日志。日志里只有启动成功的日志记录。
cnmt
2017-02-15 20:20:42 +08:00
最后用 FIND 命令在 /usr/local/mysql/data 里又找到了一个.err 文件。。这里面记录的是错误日志。
/var 下。。是安装后记录的日志文件。而将 my-innodb-heavy-4G.cnf 替换 /etc/my.cnf 后。错误日志就到了。/usr/local/mysql/data 里。。。。
日志是:
---------------------------------------

mysql-bin.index 文件有。。我设成 777 后也不行。


170215 07:05:59 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
170215 7:05:59 [Warning] 'THREAD_CONCURRENCY' is deprecated and will be removed in a future release.
170215 7:05:59 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.5.48-log) starting as process 8091 ...
/usr/local/mysql/bin/mysqld: File './mysql-bin.index' not found (Errcode: 13)
170215 7:05:59 [ERROR] Aborting

170215 7:05:59 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

170215 07:05:59 mysqld_safe mysqld from pid file /usr/local/mysql/data/zbflash.pid ended
----------------------------------------------------------------------------------------------------------------------------------

我将所有日志文件 CP 到 /usr/local/mysql/data 日志又显示:

170215 07:24:20 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
170215 7:24:20 [Warning] 'THREAD_CONCURRENCY' is deprecated and will be removed in a future release.
170215 7:24:20 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.5.48-log) starting as process 10462 ...
170215 7:24:20 [Note] Plugin 'FEDERATED' is disabled.
/usr/local/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist
170215 7:24:20 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
170215 7:24:20 InnoDB: The InnoDB memory heap is disabled
170215 7:24:20 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170215 7:24:20 InnoDB: Compressed tables use zlib 1.2.3
170215 7:24:20 InnoDB: Initializing buffer pool, size = 128.0M
170215 7:24:20 InnoDB: Completed initialization of buffer pool
170215 7:24:20 InnoDB: highest supported file format is Barracuda.
170215 7:24:20 InnoDB: Waiting for the background threads to start
170215 7:24:21 InnoDB: 5.5.48 started; log sequence number 1595675
170215 7:24:21 [Note] Recovering after a crash using mysql-bin
170215 7:24:21 [Note] Starting crash recovery...
170215 7:24:21 [Note] Crash recovery finished.
170215 7:24:21 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
170215 7:24:21 [Note] - '0.0.0.0' resolves to '0.0.0.0';
170215 7:24:21 [Note] Server socket created on IP: '0.0.0.0'.
170215 7:24:21 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
170215 7:24:21 [ERROR] Do you already have another mysqld server running on port: 3306 ?
170215 7:24:21 [ERROR] Aborting

170215 7:24:21 InnoDB: Starting shutdown...
170215 7:24:22 InnoDB: Shutdown completed; log sequence number 1595675
170215 7:24:22 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
cnmt
2017-02-16 15:47:24 +08:00
顶顶。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/340503

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX