1. 程式人生 > >Ubuntu上更改MySQL資料庫資料儲存目錄

Ubuntu上更改MySQL資料庫資料儲存目錄

[email protected]:/etc/mysql/mysql.conf.d# service mysql status
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: activating (start-post) (Result: exit-code) since Mon 2018-10-15 22:33:00 CST; 28s ago
  Process: 12947 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
  Process: 12932 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
 Main PID: 12947 (code=exited, status=1/FAILURE);         : 12948 (mysql-systemd-s)
    Tasks: 2
   Memory: 1.9M
      CPU: 367ms
   CGroup: /system.slice/mysql.service
           └─control
             ├─12948 /bin/bash /usr/share/mysql/mysql-systemd-start post
             └─13045 sleep 1
Oct 15 22:33:00 mylnx2 systemd[1]: Starting MySQL Community Server...
Oct 15 22:33:01 mylnx2 mysqld[12947]: 2018-10-15T14:33:01.013763Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
Oct 15 22:33:01 mylnx2 mysqld[12947]: 2018-10-15T14:33:01.013836Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
Oct 15 22:33:01 mylnx2 mysqld[12947]: 2018-10-15T14:33:01.207533Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit
Oct 15 22:33:01 mylnx2 mysqld[12947]: 2018-10-15T14:33:01.207663Z 0 [Warning] Can't create test file /mysql_data/mysql/mylnx2.lower-test
Oct 15 22:33:01 mylnx2 mysqld[12947]: 2018-10-15T14:33:01.207717Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.23-0ubuntu0.16.04.1-log) starting as process 129
Oct 15 22:33:01 mylnx2 mysqld[12947]: 2018-10-15T14:33:01.215413Z 0 [Warning] Can't create test file /mysql_data/mysql/mylnx2.lower-test
Oct 15 22:33:01 mylnx2 mysqld[12947]: 2018-10-15T14:33:01.215445Z 0 [Warning] Can't create test file /mysql_data/mysql/mylnx2.lower-test
Oct 15 22:33:01 mylnx2 systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE