V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
cnmt
V2EX  ›  Linux

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

  •  
  •   cnmt · 2017-02-14 22:18:56 +08:00 · 2082 次点击
    这是一个创建于 2843 天前的主题,其中的信息可能已经有所发展或是发生改变。

    mysql 5.548

    6 条回复    2017-02-16 15:47:24 +08:00
    fei31976
        1
    fei31976  
       2017-02-14 22:56:54 +08:00
    配置文件里涉及到目录, log 文件大小之类的参数,不是说改就能改的
    cnmt
        2
    cnmt  
    OP
       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
        3
    realpg  
       2017-02-15 13:31:12 +08:00
    珍爱生命远离套件
    cnmt
        4
    cnmt  
    OP
       2017-02-15 19:54:02 +08:00
    在启动不成功时。看日志。确没有启动不成的日志。日志里只有启动成功的日志记录。
    cnmt
        5
    cnmt  
    OP
       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
        6
    cnmt  
    OP
       2017-02-16 15:47:24 +08:00
    顶顶。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5453 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 116ms · UTC 07:30 · PVG 15:30 · LAX 23:30 · JFK 02:30
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.