一、修改my.cnfvi /etc/my.cnf [mysql] auto-rehash #添加auto-rehash重启mysql服务
二、客户端连接mysql时在mysql启动时加参数auto-rehash mysql –uroot -pmysql --auto-rehash