Hướng dẫn how do i stop mysql safe? - làm cách nào để dừng mysql an toàn?

Tôi đang sử dụng mysqld_safe để có thể tạo mật khẩu cho người dùng root của mình (theo Ubuntu 18.04, không được hỏi về cài đặt).

Để bắt đầu MySQL, tôi đã làm:

$ sudo mysqld_safe --skip-grant-tables&

Bây giờ, trình nền MySQL đang chạy và tôi không thể dừng nó. Dừng lại bằng cách giết chết quá trình ngăn cản tôi bắt đầu một Daemon MySQL khác vì cái trước đó đã không trả lại tài nguyên, dẫn đến các lỗi như:

2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.

Vậy làm thế nào tôi có thể dừng trình nền MySQL khi nó đã được bắt đầu sử dụng mysqld_safe?

MySQLD_SAFE là cách được khuyến nghị để khởi động máy chủ MySQLD trên Unix. mysqld_safe thêm một số tính năng an toàn như khởi động lại máy chủ khi xảy ra lỗi và ghi nhật ký thông tin thời gian chạy vào nhật ký lỗi. Một mô tả về ghi nhật ký lỗi được đưa ra sau trong phần này. is the recommended way to start a mysqld server on Unix. mysqld_safe adds some safety features such as restarting the server when an error occurs and logging runtime information to an error log. A description of error logging is given later in this section.

Ghi chú

Đối với một số nền tảng Linux, cài đặt MySQL từ các gói RPM hoặc Debian bao gồm hỗ trợ SystemD để quản lý khởi động và tắt máy chủ MySQL. Trên các nền tảng này, mysqld_safe không được cài đặt vì nó không cần thiết. Để biết thêm thông tin, hãy xem Quản lý Máy chủ MySQL với SystemD.mysqld_safe is not installed because it is unnecessary. For more information, see Managing MySQL Server with systemd.

Một hàm ý về việc không sử dụng MySQLD_SAFE trên các nền tảng sử dụng SystemD để quản lý máy chủ là việc sử dụng các phần

2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
1 hoặc
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2 trong các tệp tùy chọn không được hỗ trợ và có thể dẫn đến hành vi bất ngờ.mysqld_safe on platforms that use systemd for server management is that use of
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
1 or
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2 sections in option files is not supported and might lead to unexpected behavior.

mysqld_safe cố gắng bắt đầu một thực thi có tên MySQLD. Để ghi đè hành vi mặc định và chỉ định rõ ràng tên của máy chủ bạn muốn chạy, chỉ định tùy chọn

2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
3 hoặc
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
4 cho mysqld_safe. Bạn cũng có thể sử dụng
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
5 để chỉ ra thư mục nơi mysqld_safe nên tìm máy chủ.
tries to start an executable named mysqld. To override the default behavior and specify explicitly the name of the server you want to run, specify a
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
3 or
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
4 option to mysqld_safe. You can also use
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
5 to indicate the directory where mysqld_safe should look for the server.

Nhiều tùy chọn cho mysqld_safe giống như các tùy chọn cho mysqld. Xem các tùy chọn lệnh máy chủ.mysqld_safe are the same as the options to mysqld. See Server Command Options.

Các tùy chọn chưa biết của MySQLD_SAFE được truyền cho MySQLD nếu chúng được chỉ định trên dòng lệnh, nhưng bị bỏ qua nếu chúng được chỉ định trong nhóm

2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
1 của tệp tùy chọn. Xem bằng cách sử dụng các tệp tùy chọn.mysqld_safe are passed to mysqld if they are specified on the command line, but ignored if they are specified in the
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
1 group of an option file. See Using Option Files.

mysqld_safe đọc tất cả các tùy chọn từ các phần

2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
7,
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
8 và
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
1 trong các tệp tùy chọn. Ví dụ: nếu bạn chỉ định phần
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
7 như thế này, mysqld_safe sẽ tìm và sử dụng tùy chọn
[mysqld]
log-error=error.log
1:
reads all options from the
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
7,
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
8, and
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
1 sections in option files. For example, if you specify a
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
7 section like this, mysqld_safe finds and uses the
[mysqld]
log-error=error.log
1 option:

[mysqld]
log-error=error.log

Để tương thích ngược, mysqld_safe cũng đọc các phần

2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2, nhưng để có mặt, bạn nên đổi tên các phần như vậy thành
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
1.mysqld_safe also reads
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2 sections, but to be current you should rename such sections to
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
1.

MySQLD_SAFE chấp nhận các tùy chọn trên dòng lệnh và trong các tệp tùy chọn, như được mô tả trong bảng sau. Để biết thông tin về các tệp tùy chọn được sử dụng bởi các chương trình MySQL, hãy xem bằng cách sử dụng các tệp tùy chọn. accepts options on the command line and in option files, as described in the following table. For information about option files used by MySQL programs, see Using Option Files.


  • [mysqld]
    log-error=error.log
    4

    Hiển thị thông báo trợ giúp và thoát.

  • [mysqld]
    log-error=error.log
    5

    Đường dẫn đến thư mục cài đặt MySQL.

  • [mysqld]
    log-error=error.log
    6

    Kích thước của tệp cốt lõi mà MySQLD có thể tạo. Giá trị tùy chọn được chuyển cho ULIMIT -C.mysqld should be able to create. The option value is passed to ulimit -c.

  • [mysqld]
    log-error=error.log
    7

    Đường dẫn đến thư mục dữ liệu.

  • [mysqld]
    log-error=error.log
    8

    Đọc tệp tùy chọn này ngoài các tệp tùy chọn thông thường. Nếu tệp không tồn tại hoặc không thể truy cập được, máy chủ sẽ thoát với lỗi. Nếu

    [mysqld]
    log-error=error.log
    9 không phải là một tên đường dẫn tuyệt đối, nó được giải thích liên quan đến thư mục hiện tại. Đây phải là tùy chọn đầu tiên trên dòng lệnh nếu nó được sử dụng.

    Để biết thêm thông tin về điều này và các tùy chọn tệp tùy chọn khác, hãy xem các tùy chọn dòng lệnh ảnh hưởng đến việc xử lý tệp tùy chọn.

  • --defaults-file=

    [mysqld]
    log-error=error.log
    9

    Chỉ sử dụng tệp tùy chọn đã cho. Nếu tệp không tồn tại hoặc không thể truy cập được, máy chủ sẽ thoát với lỗi. Nếu

    [mysqld]
    log-error=error.log
    9 không phải là một tên đường dẫn tuyệt đối, nó được giải thích liên quan đến thư mục hiện tại. Đây phải là tùy chọn đầu tiên trên dòng lệnh nếu nó được sử dụng.

    Để biết thêm thông tin về điều này và các tùy chọn tệp tùy chọn khác, hãy xem các tùy chọn dòng lệnh ảnh hưởng đến việc xử lý tệp tùy chọn.

  • Chỉ sử dụng tệp tùy chọn đã cho. Nếu tệp không tồn tại hoặc không thể truy cập được, máy chủ sẽ thoát với lỗi. Nếu

    [mysqld]
    log-error=error.log
    9 không phải là một tên đường dẫn tuyệt đối, nó được giải thích liên quan đến thư mục hiện tại. Đây phải là tùy chọn đầu tiên trên dòng lệnh nếu nó được sử dụng.

    [mysqld_safe]
    malloc-lib=tcmalloc
    2mysqld_safe cannot find the server, use this option to indicate the path name to the directory where the server is located.

    Nếu mysqld_safe không thể tìm thấy máy chủ, hãy sử dụng tùy chọn này để chỉ ra tên đường dẫn đến thư mục nơi đặt máy chủ.

  • --log-error=

    [mysqld]
    log-error=error.log
    9

    Kể từ MySQL 5.7.17, tùy chọn này chỉ được chấp nhận trên dòng lệnh, không phải trong các tệp tùy chọn. Trên các nền tảng sử dụng SystemD, giá trị có thể được chỉ định trong giá trị

    [mysqld_safe]
    malloc-lib=tcmalloc
    3. Xem Quản lý Máy chủ MySQL với SystemD.

  • Viết nhật ký lỗi vào tệp đã cho. Xem nhật ký lỗi.

    [mysqld_safe]
    malloc-lib=tcmalloc
    5mysqld_safe. The following list describes the permitted values. For any other value, mysqld_safe logs a warning and uses
    [mysqld_safe]
    malloc-lib=tcmalloc
    6 format.

    • Tùy chọn này kiểm soát định dạng cho dấu thời gian trong đầu ra nhật ký do mysqld_safe tạo ra. Danh sách sau đây mô tả các giá trị được phép. Đối với bất kỳ giá trị nào khác, mysqld_safe ghi lại một cảnh báo và sử dụng định dạng

      [mysqld_safe]
      malloc-lib=tcmalloc
      6.

      [mysqld_safe]
      malloc-lib=tcmalloc
      6,
      [mysqld_safe]
      malloc-lib=tcmalloc
      8

    • Định dạng UTC ISO 8601 (giống như

      [mysqld_safe]
      malloc-lib=tcmalloc
      9 cho máy chủ). Đây là mặc định.

      [mysqld_safe]
      malloc-lib=/opt/lib/libtcmalloc_minimal.so
      0,
      [mysqld_safe]
      malloc-lib=/opt/lib/libtcmalloc_minimal.so
      1

    • Định dạng thời gian địa phương ISO 8601 (giống như

      [mysqld_safe]
      malloc-lib=/opt/lib/libtcmalloc_minimal.so
      2 cho máy chủ).

      [mysqld_safe]
      malloc-lib=/opt/lib/libtcmalloc_minimal.so
      3,
      [mysqld_safe]
      malloc-lib=/opt/lib/libtcmalloc_minimal.so
      4mysqld_safe for MySQL 5.6.

    • Định dạng

      [mysqld_safe]
      malloc-lib=/opt/lib/libtcmalloc_minimal.so
      5, như trong mysqld_safe cho mysql 5.6.

      [mysqld_safe]
      malloc-lib=/opt/lib/libtcmalloc_minimal.so
      6,
      [mysqld_safe]
      malloc-lib=/opt/lib/libtcmalloc_minimal.so
      7mysqld_safe prior to MySQL 5.6.

    Định dạng

    [mysqld_safe]
    malloc-lib=/opt/lib/libtcmalloc_minimal.so
    8, như trong mysqld_safe trước MySQL 5.6.

  • Tùy chọn này đã được thêm vào trong MySQL 5.7.11.

    [mysqld_safe]
    malloc-lib=/opt/lib/libtcmalloc_minimal.so
    9]

    Tên của thư viện để sử dụng để phân bổ bộ nhớ thay vì thư viện hệ thống

    mysql> mysqld_safe --port=port_num --defaults-file=file_name
    0. Kể từ MySQL 5.7.15, giá trị tùy chọn phải là một trong các thư mục
    mysql> mysqld_safe --port=port_num --defaults-file=file_name
    1,
    mysql> mysqld_safe --port=port_num --defaults-file=file_name
    2,
    mysql> mysqld_safe --port=port_num --defaults-file=file_name
    3 hoặc
    mysql> mysqld_safe --port=port_num --defaults-file=file_name
    4. Trước MySQL 5.7.15, bất kỳ thư viện nào cũng có thể được sử dụng bằng cách chỉ định tên đường dẫn của nó, nhưng có một biểu mẫu phím tắt để cho phép sử dụng thư viện
    mysql> mysqld_safe --port=port_num --defaults-file=file_name
    5 được vận chuyển với phân phối MySQL nhị phân cho Linux trong MySQL 5.7. Có thể biểu mẫu phím tắt không hoạt động trong một số cấu hình nhất định, trong trường hợp đó bạn nên chỉ định tên đường dẫn thay thế.

    Ghi chú

    Kể từ MySQL 5.7.13, các bản phân phối MySQL không còn bao gồm thư viện

    mysql> mysqld_safe --port=port_num --defaults-file=file_name
    5.mysqld runs:

    • Tùy chọn

      mysql> mysqld_safe --port=port_num --defaults-file=file_name
      7 hoạt động bằng cách sửa đổi giá trị môi trường
      mysql> mysqld_safe --port=port_num --defaults-file=file_name
      8 để ảnh hưởng đến liên kết động để cho phép trình tải tìm thư viện phân bổ bộ nhớ khi MySQLD chạy:

    • Trước MySQL 5.7.31, nếu tùy chọn được đưa ra là

      mysql> mysqld_safe --defaults-file=file_name --port=port_num
      2, MySQLD_SAFE tìm kiếm một thư viện
      mysql> mysqld_safe --port=port_num --defaults-file=file_name
      5 trong
      mysql> mysqld_safe --port=port_num --defaults-file=file_name
      1 và sau đó ở vị trí MySQL
      mysql> mysqld_safe --defaults-file=file_name --port=port_num
      5 (ví dụ:
      mysql> mysqld_safe --defaults-file=file_name --port=port_num
      6 hoặc bất cứ điều gì phù hợp). Nếu
      mysql> mysqld_safe --defaults-file=file_name --port=port_num
      7 được tìm thấy, tên đường dẫn của nó được thêm vào đầu giá trị
      mysql> mysqld_safe --port=port_num --defaults-file=file_name
      8 cho MySQLD. Nếu
      mysql> mysqld_safe --port=port_num --defaults-file=file_name
      5 không được tìm thấy, mysqld_safe phá thai với một lỗi.mysqld_safe looks for a
      mysql> mysqld_safe --port=port_num --defaults-file=file_name
      5 library in
      mysql> mysqld_safe --port=port_num --defaults-file=file_name
      1 and then in the MySQL
      mysql> mysqld_safe --defaults-file=file_name --port=port_num
      5 location (for example,
      mysql> mysqld_safe --defaults-file=file_name --port=port_num
      6 or whatever is appropriate). If
      mysql> mysqld_safe --defaults-file=file_name --port=port_num
      7 is found, its path name is added to the beginning of the
      mysql> mysqld_safe --port=port_num --defaults-file=file_name
      8 value for mysqld. If
      mysql> mysqld_safe --port=port_num --defaults-file=file_name
      5 is not found, mysqld_safe aborts with an error.

      Kể từ MySQL 5.7.31,

      mysql> mysqld_safe --port=port_num --defaults-file=file_name
      5 không phải là giá trị được phép cho tùy chọn
      mysql> mysqld_safe --port=port_num --defaults-file=file_name
      7.

    • Nếu tùy chọn được đưa ra là

      cd mysql_installation_directory
      bin/mysqld_safe &
      2, đường dẫn đầy đủ đó được thêm vào đầu giá trị
      mysql> mysqld_safe --port=port_num --defaults-file=file_name
      8. Nếu đường dẫn đầy đủ trỏ đến một tệp không tồn tại hoặc không thể đọc được, mysqld_safe phá thai với một lỗi.mysqld_safe aborts with an error.

    • Đối với các trường hợp mysqld_safe thêm một tên đường dẫn vào

      mysql> mysqld_safe --port=port_num --defaults-file=file_name
      8, nó sẽ thêm đường dẫn vào đầu của bất kỳ giá trị hiện có nào mà biến đã có.mysqld_safe adds a path name to
      mysql> mysqld_safe --port=port_num --defaults-file=file_name
      8, it adds the path to the beginning of any existing value the variable already has.

    Ghi chú

    Trên các hệ thống quản lý máy chủ bằng systemd, mysqld_safe không khả dụng. Thay vào đó, chỉ định thư viện phân bổ bằng cách cài đặt

    mysql> mysqld_safe --port=port_num --defaults-file=file_name
    8 trong
    cd mysql_installation_directory
    bin/mysqld_safe &
    6.mysqld_safe is not available. Instead, specify the allocation library by setting
    mysql> mysqld_safe --port=port_num --defaults-file=file_name
    8 in
    cd mysql_installation_directory
    bin/mysqld_safe &
    6.

    Người dùng Linux có thể sử dụng

    cd mysql_installation_directory
    bin/mysqld_safe &
    7 được bao gồm trong các gói nhị phân bằng cách thêm các dòng này vào tệp
    cd mysql_installation_directory
    bin/mysqld_safe &
    8:

    [mysqld_safe]
    malloc-lib=tcmalloc

    Những dòng đó cũng đủ cho người dùng trên bất kỳ nền tảng nào đã cài đặt gói

    mysql> mysqld_safe --port=port_num --defaults-file=file_name
    5 trong
    mysql> mysqld_safe --port=port_num --defaults-file=file_name
    1. Để sử dụng thư viện
    mysql> mysqld_safe --port=port_num --defaults-file=file_name
    5 cụ thể, chỉ định tên đường dẫn đầy đủ của nó. Thí dụ:

    [mysqld_safe]
    malloc-lib=/opt/lib/libtcmalloc_minimal.so
  • mysqld_safe2

    Tên của chương trình máy chủ (trong thư mục mysqld_safe3) mà bạn muốn bắt đầu. Tùy chọn này là cần thiết nếu bạn sử dụng phân phối nhị phân MySQL nhưng có thư mục dữ liệu bên ngoài phân phối nhị phân. Nếu mysqld_safe không thể tìm thấy máy chủ, hãy sử dụng tùy chọn

    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    5 để chỉ ra tên đường dẫn đến thư mục nơi đặt máy chủ.mysqld_safe cannot find the server, use the
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    5 option to indicate the path name to the directory where the server is located.

    Kể từ MySQL 5.7.15, tùy chọn này chỉ được chấp nhận trên dòng lệnh, không phải trong các tệp tùy chọn. Trên các nền tảng sử dụng SystemD, giá trị có thể được chỉ định trong giá trị

    [mysqld_safe]
    malloc-lib=tcmalloc
    3. Xem Quản lý Máy chủ MySQL với SystemD.

  • mysqld_safe6

    Tùy chọn này tương tự như tùy chọn

    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    3, nhưng bạn chỉ chỉ định hậu tố cho tên chương trình máy chủ. Tên cơ sở được coi là MySQLD. Ví dụ: nếu bạn sử dụng mysqld_safe8, mysqld_safe sẽ bắt đầu chương trình MySQLD-Debug trong thư mục mysqld_safe3. Nếu đối số với
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    4 trống, mysqld_safe sử dụng mysqld trong thư mục mysqld_safe3.mysqld. For example, if you use mysqld_safe8, mysqld_safe starts the mysqld-debug program in the mysqld_safe3 directory. If the argument to
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    4 is empty, mysqld_safe uses mysqld in the mysqld_safe3 directory.

    Kể từ MySQL 5.7.15, tùy chọn này chỉ được chấp nhận trên dòng lệnh, không phải trong các tệp tùy chọn. Trên các nền tảng sử dụng SystemD, giá trị có thể được chỉ định trong giá trị

    [mysqld_safe]
    malloc-lib=tcmalloc
    3. Xem Quản lý Máy chủ MySQL với SystemD.

  • mysqld_safe6

    Tùy chọn này tương tự như tùy chọn

    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    3, nhưng bạn chỉ chỉ định hậu tố cho tên chương trình máy chủ. Tên cơ sở được coi là MySQLD. Ví dụ: nếu bạn sử dụng mysqld_safe8, mysqld_safe sẽ bắt đầu chương trình MySQLD-Debug trong thư mục mysqld_safe3. Nếu đối số với
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    4 trống, mysqld_safe sử dụng mysqld trong thư mục mysqld_safe3.

  • root3

    Sử dụng chương trình root4 để đặt mức độ ưu tiên lập lịch của máy chủ cho giá trị đã cho.

    root5

  • Không đọc bất kỳ tệp tùy chọn. Nếu khởi động chương trình không thành công do đọc các tùy chọn không xác định từ tệp tùy chọn, root5 có thể được sử dụng để ngăn chúng không được đọc. Đây phải là tùy chọn đầu tiên trên dòng lệnh nếu nó được sử dụng.

    Để biết thêm thông tin về điều này và các tùy chọn tệp tùy chọn khác, hãy xem các tùy chọn dòng lệnh ảnh hưởng đến việc xử lý tệp tùy chọn.mysqld should be able to open. The option value is passed to ulimit -n.

    Ghi chú

    Trên các hệ thống quản lý máy chủ bằng systemd, mysqld_safe không khả dụng. Thay vào đó, chỉ định thư viện phân bổ bằng cách cài đặt

    mysql> mysqld_safe --port=port_num --defaults-file=file_name
    8 trong
    cd mysql_installation_directory
    bin/mysqld_safe &
    6.mysqld_safe as root for this to function properly.

  • --pid-file=

    [mysqld]
    log-error=error.log
    9

    Người dùng Linux có thể sử dụng

    cd mysql_installation_directory
    bin/mysqld_safe &
    7 được bao gồm trong các gói nhị phân bằng cách thêm các dòng này vào tệp
    cd mysql_installation_directory
    bin/mysqld_safe &
    8:mysqld should use for its process ID file.

    Những dòng đó cũng đủ cho người dùng trên bất kỳ nền tảng nào đã cài đặt gói

    mysql> mysqld_safe --port=port_num --defaults-file=file_name
    5 trong
    mysql> mysqld_safe --port=port_num --defaults-file=file_name
    1. Để sử dụng thư viện
    mysql> mysqld_safe --port=port_num --defaults-file=file_name
    5 cụ thể, chỉ định tên đường dẫn đầy đủ của nó. Thí dụ:mysqld_safe has its own process ID file, which is always named
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    00 and located in the MySQL data directory.

  • mysqld_safe2

    Tên của chương trình máy chủ (trong thư mục mysqld_safe3) mà bạn muốn bắt đầu. Tùy chọn này là cần thiết nếu bạn sử dụng phân phối nhị phân MySQL nhưng có thư mục dữ liệu bên ngoài phân phối nhị phân. Nếu mysqld_safe không thể tìm thấy máy chủ, hãy sử dụng tùy chọn

    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    5 để chỉ ra tên đường dẫn đến thư mục nơi đặt máy chủ.

  • Kể từ MySQL 5.7.15, tùy chọn này chỉ được chấp nhận trên dòng lệnh, không phải trong các tệp tùy chọn. Trên các nền tảng sử dụng SystemD, giá trị có thể được chỉ định trong giá trị

    [mysqld_safe]
    malloc-lib=tcmalloc
    3. Xem Quản lý Máy chủ MySQL với SystemD.

    mysqld_safe6

  • Tùy chọn này tương tự như tùy chọn

    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    3, nhưng bạn chỉ chỉ định hậu tố cho tên chương trình máy chủ. Tên cơ sở được coi là MySQLD. Ví dụ: nếu bạn sử dụng mysqld_safe8, mysqld_safe sẽ bắt đầu chương trình MySQLD-Debug trong thư mục mysqld_safe3. Nếu đối số với
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    4 trống, mysqld_safe sử dụng mysqld trong thư mục mysqld_safe3.

    root3mysqld processes at startup. This option works only on Linux.

  • Sử dụng chương trình root4 để đặt mức độ ưu tiên lập lịch của máy chủ cho giá trị đã cho.

    root5

  • Không đọc bất kỳ tệp tùy chọn. Nếu khởi động chương trình không thành công do đọc các tùy chọn không xác định từ tệp tùy chọn, root5 có thể được sử dụng để ngăn chúng không được đọc. Đây phải là tùy chọn đầu tiên trên dòng lệnh nếu nó được sử dụng.

    Để biết thêm thông tin về điều này và các tùy chọn tệp tùy chọn khác, hãy xem các tùy chọn dòng lệnh ảnh hưởng đến việc xử lý tệp tùy chọn.logger program.

    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    07 suppresses the use of
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    09; messages are written to an error log file.

    root7

    Số lượng các tệp mà MySQLD có thể mở. Giá trị tùy chọn được chuyển cho ulimit -n.mysqld logging is deprecated as of MySQL 5.7.5. Use the server

    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    14 system variable instead. To control the facility, use the server
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    15 system variable. See Error Logging to the System Log.

  • Bạn phải bắt đầu mysqld_safe dưới dạng root để điều này hoạt động đúng.

    Tên đường dẫn mà MySQLD nên sử dụng cho tệp ID quy trình của nó.mysqld_safe and mysqld are written with identifiers of mysqld_safe and

    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    19, respectively. To specify a suffix for the identifiers, use
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    16, which modifies the identifiers to be
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    21 and
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    22.

    Sử dụng tùy chọn này để kiểm soát ghi nhật ký MySQLD được không dùng nữa kể từ MySQL 5.7.5. Thay vào đó, sử dụng biến hệ thống

    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    23. Xem lỗi đăng nhập vào nhật ký hệ thống.mysqld logging is deprecated as of MySQL 5.7.5. Use the server
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    23 system variable instead. See Error Logging to the System Log.

  • 2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    24

    Đặt biến môi trường múi giờ

    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    25 thành giá trị tùy chọn đã cho. Tham khảo tài liệu hệ điều hành của bạn cho các định dạng đặc tả múi giờ pháp lý.

  • ________ 126 | ________ 127}

    Chạy máy chủ MySQLD dưới dạng người dùng có tên

    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    28 hoặc ID người dùng số
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    27. .mysqld server as the user having the name
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    28 or the numeric user ID
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    27. (User in this context refers to a system login account, not a MySQL user listed in the grant tables.)

Nếu bạn thực hiện mysqld_safe với tùy chọn

2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
30 hoặc
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
31 Để đặt tên cho một tệp tùy chọn, tùy chọn phải là tệp đầu tiên được đưa ra trên dòng lệnh hoặc tệp tùy chọn không được sử dụng. Ví dụ: lệnh này không sử dụng tệp tùy chọn được đặt tên:mysqld_safe with the
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
30 or
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
31 option to name an option file, the option must be the first one given on the command line or the option file is not used. For example, this command does not use the named option file:

mysql> mysqld_safe --port=port_num --defaults-file=file_name

Thay vào đó, hãy sử dụng lệnh sau:

mysql> mysqld_safe --defaults-file=file_name --port=port_num

Tập lệnh MySQLD_SAFE được viết để thông thường nó có thể khởi động một máy chủ được cài đặt từ nguồn hoặc phân phối nhị phân của MySQL, mặc dù các loại phân phối này thường cài đặt máy chủ ở các vị trí hơi khác nhau. .mysqld_safe script is written so that it normally can start a server that was installed from either a source or a binary distribution of MySQL, even though these types of distributions typically install the server in slightly different locations. (See Installation Layouts.) mysqld_safe expects one of the following conditions to be true:

  • Máy chủ và cơ sở dữ liệu có thể được tìm thấy liên quan đến thư mục làm việc (thư mục mà mysqld_safe được gọi). Đối với các bản phân phối nhị phân, MySQLD_SAFE xem theo thư mục làm việc của nó cho các thư mục

    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    32 và
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    33. Đối với các bản phân phối nguồn, nó tìm kiếm các thư mục
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    34 và
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    35. Điều kiện này sẽ được đáp ứng nếu bạn thực hiện mysqld_safe từ thư mục cài đặt MySQL của bạn (ví dụ:
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    36 cho phân phối nhị phân).mysqld_safe is invoked). For binary distributions, mysqld_safe looks under its working directory for
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    32 and
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    33 directories. For source distributions, it looks for
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    34 and
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    35 directories. This condition should be met if you execute mysqld_safe from your MySQL installation directory (for example,
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    36 for a binary distribution).

  • Nếu máy chủ và cơ sở dữ liệu không thể được tìm thấy liên quan đến thư mục làm việc, mysqld_safe sẽ cố gắng xác định vị trí chúng bằng tên đường dẫn tuyệt đối. Các vị trí điển hình là

    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    37 và
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    38. Các vị trí thực tế được xác định từ các giá trị được cấu hình vào phân phối tại thời điểm nó được xây dựng. Chúng sẽ đúng nếu MySQL được cài đặt trong vị trí được chỉ định tại thời điểm cấu hình.mysqld_safe attempts to locate them by absolute path names. Typical locations are
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    37 and
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    38. The actual locations are determined from the values configured into the distribution at the time it was built. They should be correct if MySQL is installed in the location specified at configuration time.

Vì MySQLD_SAFE cố gắng tìm máy chủ và cơ sở dữ liệu liên quan đến thư mục làm việc của riêng mình, bạn có thể cài đặt phân phối nhị phân của MySQL ở bất cứ đâu, miễn là bạn chạy mysqld_safe từ thư mục cài đặt MySQL:mysqld_safe tries to find the server and databases relative to its own working directory, you can install a binary distribution of MySQL anywhere, as long as you run mysqld_safe from the MySQL installation directory:

cd mysql_installation_directory
bin/mysqld_safe &

Nếu mysqld_safe không thành công, ngay cả khi được gọi từ thư mục cài đặt MySQL, hãy chỉ định các tùy chọn

2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
5 và
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
40 để chỉ ra các thư mục trong đó máy chủ và cơ sở dữ liệu được đặt trên hệ thống của bạn.mysqld_safe fails, even when invoked from the MySQL installation directory, specify the
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
5 and
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
40 options to indicate the directories in which the server and databases are located on your system.

mysqld_safe cố gắng sử dụng các tiện ích hệ thống giấc ngủ và ngày để xác định số lần mỗi giây nó đã cố gắng bắt đầu. Nếu các tiện ích này có mặt và lần thử bắt đầu mỗi giây lớn hơn 5, MySQLD_SAFE sẽ chờ 1 Thứ hai trước khi bắt đầu lại. Điều này nhằm ngăn chặn việc sử dụng CPU quá mức trong trường hợp thất bại nhiều lần. (Lỗi #11761530, lỗi #54035) tries to use the sleep and date system utilities to determine how many times per second it has attempted to start. If these utilities are present and the attempted starts per second is greater than 5, mysqld_safe waits 1 full second before starting again. This is intended to prevent excessive CPU usage in the event of repeated failures. (Bug #11761530, Bug #54035)

Khi bạn sử dụng mysqld_safe để bắt đầu mysqld, mysqld_safe sẽ sắp xếp các tin nhắn lỗi (và thông báo) từ chính nó và từ MySQLD để đi đến cùng một đích.mysqld_safe to start mysqld, mysqld_safe arranges for error (and notice) messages from itself and from mysqld to go to the same destination.

Có một số tùy chọn mysqld_safe để kiểm soát đích của các tin nhắn này:mysqld_safe options for controlling the destination of these messages:

  • -log-error = ________ 29: Viết thông báo lỗi vào tệp lỗi được đặt tên.: Write error messages to the named error file.

  • 2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    06: Viết thông báo lỗi vào
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    09 trên các hệ thống hỗ trợ chương trình logger.logger program.

  • 2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    07: Không ghi thông báo lỗi vào
    2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
    2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
    
    09. Tin nhắn được ghi vào tệp nhật ký lỗi mặc định (________ 146.err trong thư mục dữ liệu) hoặc vào tệp được đặt tên nếu tùy chọn
    [mysqld]
    log-error=error.log
    1 được đưa ra.

Nếu không có tùy chọn nào trong số này được đưa ra, mặc định là

2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
07.

Khi MySQLD_SAFE ghi tin nhắn, các thông báo sẽ đến đích ghi nhật ký (

2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
09 hoặc tệp nhật ký lỗi) và
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
50. Lỗi đi đến đích ghi nhật ký và
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
51.mysqld_safe writes a message, notices go to the logging destination (
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
09 or the error log file) and
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
50. Errors go to the logging destination and
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
51.