zabbix导入数据出现ERROR 1046 (3D000) at line 1: No database selected
zabbix导入数据出现
zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uzabbix -p
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1046 (3D000) at line 1: No database selected
解决方法
编辑 /usr/share/doc/zabbix-server-mysql/create.sql.gz
添加use zabbix;
再次执行
/usr/share/doc/zabbix-server-mysql$ sudo vi create.sql.gz
输入密码后,等待数据导入