1. 程式人生 > >mysql5.7.18備份恢復新建例項啟動失敗

mysql5.7.18備份恢復新建例項啟動失敗

mysql5.7.18備份恢復新建例項啟動失敗

mysql5.7.18備份恢復新建例項啟動失敗

  • 報錯資訊

 
  1. [[email protected]-192-168-1-128 mysql5.7.18]# /home/program/mysql5.7.18/bin/mysqld_safe --defaults-file=/home/program/mysql5.7.18/my.cnf --user=mysql
  2. 2017-05-24T02:41:30.843275Z mysqld_safe error: log-error set to '/home/program/mysql5.7.18/mysqld.log'
    , however file don't exists. Create writable for user 'mysql'.
  • 配置

 
  1. [mysqld_safe]
  2. # Increase the amount of open files allowed per process. Warning: Make
  3. # sure you have set the global system limit high enough! The high value
  4. # is required for a large number of opened tables
  5. open
    -files-limit = 8192
  6. log-error=/home/program/mysql5.7.18/mysqld.log
  7. pid-file=/home/program/mysql5.7.18/mysqld.pid
  • 解決方法

 
  1. [[email protected]-192-168-1-128 mysql5.7.18]# touch mysqld.log
  2. [[email protected]-192-168-1-128 mysql5.7.18]# chown mysqlmysql mysqld.log
  3. [[email protected]
    -192-168-1-128 mysql5.7.18]# /home/program/mysql5.7.18/bin/mysqld_safe --defaults-file=/home/program/mysql5.7.18/my.cnf --user=mysql &
  4. [[email protected]-192-168-1-128 mysql5.7.18]# ps -ef|grep mysql |grep -v grep
  5. root 8053 1 0 22:52 ? 00:00:00 /bin/sh /home/program/mysql5.7.18/bin/mysqld_safe --defaults-file=/home/program/mysql5.7.18/my.cnf --user=mysql
  6. mysql 9022 8053 0 22:52 ? 00:00:00 /home/program/mysql5.7.18/bin/mysqld --defaults-file=/home/program/mysql5.7.18/my.cnf --basedir=/home/program/mysql5.7.18 --datadir=/home/data/mysql --plugin-dir=/home/program/mysql5.7.18/lib/plugin --user=mysql --log-error=/home/program/mysql5.7.18/mysqld.log --open-files-limit=8192 --pid-file=/home/program/mysql5.7.18/mysqld.pid --socket=/home/program/mysql5.7.18/mysql.sock --port=3306