Tôi cũng gặp vấn đề này khi cố gắng khởi động máy chủ, vì vậy nhiều câu trả lời ở đây chỉ cần nói để khởi động máy chủ không hoạt động. Điều đầu tiên bạn có thể làm là thực hiện các mục sau để xem liệu có bất kỳ lỗi cấu hình nào không:
/usr/sbin/mysqld --verbose --help 1>/dev/null
Tôi đã có một lỗi hiển thị:
160816 19:24:33 [Note] /usr/sbin/mysqld [mysqld 5.5.50-0ubuntu0.14.04.1-log] starting as process 9461 ...
160816 19:24:33 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
160816 19:24:33 [Note] Plugin 'FEDERATED' is disabled.
160816 19:24:33 [ERROR] /usr/sbin/mysqld: unknown variable 'innodb-online-alter-log-max-size=4294967296'
160816 19:24:33 [ERROR] Aborting
Một
160816 19:24:33 [Note] /usr/sbin/mysqld [mysqld 5.5.50-0ubuntu0.14.04.1-log] starting as process 9461 ...
160816 19:24:33 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
160816 19:24:33 [Note] Plugin 'FEDERATED' is disabled.
160816 19:24:33 [ERROR] /usr/sbin/mysqld: unknown variable 'innodb-online-alter-log-max-size=4294967296'
160816 19:24:33 [ERROR] Aborting
2 đơn giản đã cho tôi thấy chính xác tệp nào chứa dòng vi phạm, vì vậy tôi đã xóa dòng đó khỏi tệp.Sau đó, kiểm tra tệp
160816 19:24:33 [Note] /usr/sbin/mysqld [mysqld 5.5.50-0ubuntu0.14.04.1-log] starting as process 9461 ...
160816 19:24:33 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
160816 19:24:33 [Note] Plugin 'FEDERATED' is disabled.
160816 19:24:33 [ERROR] /usr/sbin/mysqld: unknown variable 'innodb-online-alter-log-max-size=4294967296'
160816 19:24:33 [ERROR] Aborting
3 của tôi mà tôi đã có:InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 671088640 bytes!
160816 22:46:46 [ERROR] Plugin 'InnoDB' init function returned error.
160816 22:46:46 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
160816 22:46:46 [ERROR] Unknown/unsupported storage engine: InnoDB
160816 22:46:46 [ERROR] Aborting
Dựa trên câu hỏi này, giải pháp được chấp nhận sẽ không hoạt động vì tôi thậm chí không thể bắt đầu máy chủ, vì vậy tôi đã làm theo những gì một số nhận xét đã nói và xóa các tệp
160816 19:24:33 [Note] /usr/sbin/mysqld [mysqld 5.5.50-0ubuntu0.14.04.1-log] starting as process 9461 ...
160816 19:24:33 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
160816 19:24:33 [Note] Plugin 'FEDERATED' is disabled.
160816 19:24:33 [ERROR] /usr/sbin/mysqld: unknown variable 'innodb-online-alter-log-max-size=4294967296'
160816 19:24:33 [ERROR] Aborting
4 và 160816 19:24:33 [Note] /usr/sbin/mysqld [mysqld 5.5.50-0ubuntu0.14.04.1-log] starting as process 9461 ...
160816 19:24:33 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
160816 19:24:33 [Note] Plugin 'FEDERATED' is disabled.
160816 19:24:33 [ERROR] /usr/sbin/mysqld: unknown variable 'innodb-online-alter-log-max-size=4294967296'
160816 19:24:33 [ERROR] Aborting
5 của tôi.Điều này cho phép máy chủ bắt đầu và tôi có thể kết nối và thực hiện các truy vấn, tuy nhiên việc kiểm tra tệp nhật ký lỗi của tôi, nó đã nhanh chóng được điền vào hàng chục ngàn dòng như thế này:
160816 22:52:15 InnoDB: Error: page 1415 log sequence number 82039318708
InnoDB: is in the future! Current system log sequence number 81640793100.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: //dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: for more information.
Dựa trên một đề xuất từ đây, để khắc phục điều này, tôi đã thực hiện một mysqldump và khôi phục tất cả các cơ sở dữ liệu [xem liên kết cho một số giải pháp khác].
$ mysqldump -u root -p --allow-keywords --add-drop-database --comments --hex-blob --opt --quote-names --databases db_1 db_2 db_3 db_etc > backup-all-databases.sql
$ mysql -u root -p < backup-all-databases.sql
Mọi thứ dường như đang hoạt động như mong đợi bây giờ.
Tôi tiếp tục nhận được lỗi sau này mỗi khi tôi cố gắng khởi động lại MySQL. Nó đã hoạt động tốt trước khi tôi thay đổi thư mục dữ liệu mặc định.
Lỗi 2002 [HY000]: Không thể kết nối với máy chủ MySQL cục bộ thông qua ổ cắm '/var/lib /mysql/mysql.sock' [111]
Tôi biết có những giải pháp khác được đăng bởi những người khác nhưng không ai trong số họ làm việc cho tôi.
Hỏi ngày 21 tháng 4 năm 2015 lúc 19:59Apr 21, 2015 at 19:59
2
Kiểm tra folowing
Trước tiên, hãy kiểm tra xem một phiên bản khác có phải là Runnig trong cùng một máy không
6160816 19:24:33 [Note] /usr/sbin/mysqld [mysqld 5.5.50-0ubuntu0.14.04.1-log] starting as process 9461 ... 160816 19:24:33 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead. 160816 19:24:33 [Note] Plugin 'FEDERATED' is disabled. 160816 19:24:33 [ERROR] /usr/sbin/mysqld: unknown variable 'innodb-online-alter-log-max-size=4294967296' 160816 19:24:33 [ERROR] Aborting
Sau đó, hãy kiểm tra xem tệp của bạn có phải không [có thể trong/etc/mysql/thư mục]
[mysqld]
datadir = /var/lib/mysql/
socket = /var/lib/mysql/mysql.sock
- Tiếp theo, bạn đã thay đổi thư mục dữ liệu mặc định, bạn đã đưa ra các quyền phù hợp với thư mục mới ngay bây giờ
chown mysql:mysql -R /var/lib/mysql/* chmod 755 -R /var/lib/mysql/*
Sau khi thay đổi quyền khởi động lại dịch vụ và kiểm tra
7160816 19:24:33 [Note] /usr/sbin/mysqld [mysqld 5.5.50-0ubuntu0.14.04.1-log] starting as process 9461 ... 160816 19:24:33 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead. 160816 19:24:33 [Note] Plugin 'FEDERATED' is disabled. 160816 19:24:33 [ERROR] /usr/sbin/mysqld: unknown variable 'innodb-online-alter-log-max-size=4294967296' 160816 19:24:33 [ERROR] Aborting
Đã trả lời ngày 22 tháng 4 năm 2015 lúc 12:52Apr 22, 2015 at 12:52
Koustuvkoustuvkoustuv
7204 Huy hiệu bạc17 Huy hiệu đồng4 silver badges17 bronze badges
0
Vấn đề của tôi là nhiều quy trình MySQL đã chạy đồng thời.
Đầu tiên giết các quy trình bằng:
sudo pkill mysql
và
sudo pkill mysqld
Khởi động lại MySQL
sudo service mysql restart
Bây giờ bạn sẽ có thể đăng nhập
160816 19:24:33 [Note] /usr/sbin/mysqld [mysqld 5.5.50-0ubuntu0.14.04.1-log] starting as process 9461 ...
160816 19:24:33 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
160816 19:24:33 [Note] Plugin 'FEDERATED' is disabled.
160816 19:24:33 [ERROR] /usr/sbin/mysqld: unknown variable 'innodb-online-alter-log-max-size=4294967296'
160816 19:24:33 [ERROR] Aborting
0Đã trả lời ngày 29 tháng 4 năm 2017 lúc 7:22Apr 29, 2017 at 7:22
OmaromarOmar
711 huy hiệu bạc2 huy hiệu đồng1 silver badge2 bronze badges
0
Có vẻ như các tệp ổ cắm bị thiếu.
160816 19:24:33 [Note] /usr/sbin/mysqld [mysqld 5.5.50-0ubuntu0.14.04.1-log] starting as process 9461 ...
160816 19:24:33 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
160816 19:24:33 [Note] Plugin 'FEDERATED' is disabled.
160816 19:24:33 [ERROR] /usr/sbin/mysqld: unknown variable 'innodb-online-alter-log-max-size=4294967296'
160816 19:24:33 [ERROR] Aborting
8 và 160816 19:24:33 [Note] /usr/sbin/mysqld [mysqld 5.5.50-0ubuntu0.14.04.1-log] starting as process 9461 ...
160816 19:24:33 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
160816 19:24:33 [Note] Plugin 'FEDERATED' is disabled.
160816 19:24:33 [ERROR] /usr/sbin/mysqld: unknown variable 'innodb-online-alter-log-max-size=4294967296'
160816 19:24:33 [ERROR] Aborting
7 phụ thuộc vào sự tồn tại của tệp ổ cắm để tắt.Bạn sẽ phải kết nối với MySQL bằng MySQLadMin và TCP/IP để tắt máy
160816 19:24:33 [Note] /usr/sbin/mysqld [mysqld 5.5.50-0ubuntu0.14.04.1-log] starting as process 9461 ...
160816 19:24:33 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
160816 19:24:33 [Note] Plugin 'FEDERATED' is disabled.
160816 19:24:33 [ERROR] /usr/sbin/mysqld: unknown variable 'innodb-online-alter-log-max-size=4294967296'
160816 19:24:33 [ERROR] Aborting
1Tôi có bài viết về việc tắt máy như thế này
Đã trả lời ngày 21 tháng 4 năm 2015 lúc 20:13Apr 21, 2015 at 20:13
RolandomysqldbarolandomysqldbaRolandoMySQLDBA
Phim thương hiệu vàng 176K3232 gold badges304 silver badges500 bronze badges
Xin chào, tôi vừa cài đặt Zabbix 3.0 và cùng một vấn đề đã xuất hiện sau vài giờ trước. Khi tôi kiểm tra quyền của Zabbix trong phpmyadmin, tôi nhận ra rằng không có quyền cho người dùng "Zabbix". Tôi đã cho phép Zabbix và giải quyết vấn đề. Điều này có thể hữu ích cho ai đó.
Đã trả lời ngày 9 tháng 3 năm 2016 lúc 14:30Mar 9, 2016 at 14:30
TUNCMTUNCMtuncm
Huy hiệu đồng 2111 bronze badge
Tôi đã nhận được cùng một lỗi, nhưng lý do đơn giản: Hệ thống đã hết tất cả không gian đĩa.
Đã trả lời ngày 12 tháng 6 năm 2018 lúc 14:51Jun 12, 2018 at 14:51
HannuhannuHannu
Huy hiệu đồng 2911 bronze badge
0
Tôi cũng nhận được lỗi giống như "Lỗi 2002 [Hy000]: Không thể kết nối với máy chủ MySQL cục bộ thông qua ổ cắm '/var/lib /mysql/mysql.sock' [111]". Tôi đã gỡ cài đặt và cài đặt lại MySQL nhiều lần và đã dành nhiều giờ để khắc phục sự cố. Vấn đề mà tôi nhận thấy là khi tôi thêm thông tin đăng nhập vào tệp tùy chọn My.cnf được đặt trong /etc/my.cnf vì điều này sẽ gây ra sự cố MYSQL khi bắt đầu dịch vụ và sẽ gây ra lỗi.
Để giải quyết điều này, tôi đã xóa thông tin đăng nhập ra khỏi tệp tùy chọn My.cnf trong /etc/my.cnf và tôi tạo tệp tùy chọn .my.cnf trong thư mục gia đình. Ví dụ: /home/username/.my.cnf trong linux [thay thế tên người dùng bằng tên người dùng của bạn trong Linux] và thêm thông tin đăng nhập trong đó. Không có vấn đề gì sau đó.
Đã trả lời ngày 22 tháng 1 năm 2018 lúc 15:55Jan 22, 2018 at 15:55
Kiểm tra dịch vụ MySQL của bạn hoặc nếu bạn đang truy cập thông qua SSH, hãy thử chạy:
InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 671088640 bytes!
160816 22:46:46 [ERROR] Plugin 'InnoDB' init function returned error.
160816 22:46:46 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
160816 22:46:46 [ERROR] Unknown/unsupported storage engine: InnoDB
160816 22:46:46 [ERROR] Aborting
0
RLF
13.9k2 Huy hiệu vàng31 Huy hiệu bạc44 Huy hiệu đồng2 gold badges31 silver badges44 bronze badges
Đã trả lời ngày 13 tháng 7 năm 2016 lúc 20:00Jul 13, 2016 at 20:00
1