毫无预兆的,MySQL 罢工了。 用 mysql.server 启动脚本启动之后,没有任何提示信息就结束,mysqld进程自然是没有起来。
把 mysql.server 里面 $bindir/mysqld_safe --datadir=$datadir --pid-file=$server_pid_file >/dev/null 2>&1 这句的输出重定向去掉后运行,结果发现报错: File size limit exceedednohup ... ...
这样看来自然是有文件太大了。但查看了 mysql 数据目录下相关的数据库文件和日志文件,最大的也就几百兆。 ulimit -a 查看也没有对文件大小做任何限制。
经过 N 分钟的郁闷之后,决定用 find / -size +2048000k 查找整个硬盘上面的可疑文件。结果是: /var/log/pacct 这个2G多的大文件冒了出来。很显然,这是 SA 激活了 accton 之后产生的日志文件,没给做回滚。二话不说,清空 /var/log/pacct 再启动一次 MySQL ,一切恢复正常!
搞不懂的是为什么 mysql 的启动脚本会受这样一个无关痛痒的进程统计日志的影响而导致 mysqld 进程完全无法启动。估计还是 mysql.server / mysqld_safe 脚本逻辑的问题。。

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.

Article discusses using foreign keys to represent relationships in databases, focusing on best practices, data integrity, and common pitfalls to avoid.

Article discusses securing MySQL against SQL injection and brute-force attacks using prepared statements, input validation, and strong password policies.(159 characters)


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

Notepad++7.3.1
Easy-to-use and free code editor

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.