方式一:临时使用自动补全功能 mysql -u root -p --auto-rehash 方式二:永久使用自动补全功能 sudo vi /etc/mysql/conf.d/mysql.cnf 在[mysql]下一行添加 auto-rehash 保存并退出 即时生效!