Ubuntu14.04启动MySQL遇'mysqld:参数过多'报错求助
Fixing "mysqld: Too many arguments (first extra is 'start')" on Ubuntu 14.04
Hey there, let's break down and fix your MySQL startup issues step by step:
1. Fix the "Too many arguments" error first
The core problem here is how you're trying to start MySQL. mysqld is the actual MySQL daemon binary—it doesn't recognize the start command argument. On Ubuntu 14.04 (which uses Upstart, not systemd), you need to use the system service commands instead:
- Start MySQL properly with:
Or alternatively:sudo service mysql startsudo start mysql
2. Resolve the "Table 'mysql.plugin' doesn't exist" error
Your logs also show a missing system table, which will prevent MySQL from starting correctly even after fixing the command issue. Here's how to fix that:
- First, stop any running MySQL processes:
sudo service mysql stop - Start MySQL in safe mode to bypass permission checks:
sudo mysqld_safe --skip-grant-tables & - Connect to the MySQL shell:
mysql -u root - Inside the MySQL shell, repair the missing
plugintable:USE mysql; REPAIR TABLE plugin; - If repair doesn't work, you'll need to reinitialize the system tables (note: this will erase all existing MySQL data—only do this if you don't have important data or have backups):
sudo service mysql stop sudo mysqld --initialize --user=mysql --datadir=/var/lib/mysql - Restart the MySQL service:
sudo service mysql start - Finally, run the upgrade tool to sync system tables with your MySQL version:
(You'll be prompted to enter your root MySQL password.)sudo mysql_upgrade -u root -p
3. Address the deprecation warnings
Your logs show some configuration warnings that you should fix to avoid issues in future updates:
- Open your MySQL config file (usually
/etc/mysql/my.cnfor/etc/mysql/mysql.conf.d/mysqld.cnf) with a text editor:sudo nano /etc/mysql/my.cnf - Find the line with
key_bufferand replace it withkey_buffer_size - Find the line with
myisam-recoverand replace it withmyisam-recover-options - For the
secure-file-privwarning, set it to a directory only accessible by themysqluser, e.g.:
Make sure the directory exists:secure-file-priv = /var/lib/mysql-files/sudo mkdir -p /var/lib/mysql-files/ sudo chown mysql:mysql /var/lib/mysql-files/ - Save the file and restart MySQL to apply changes:
sudo service mysql restart
内容的提问来源于stack exchange,提问作者Alexis Wong
相关产品推荐
相关产品推荐

