在mysql下创建了个zabbix库。也给他负了权限:mysql -uroot -pzhao@123
create database zabbix;
grant all on zabbix.* to zabbix@localhost identified by '123456';
flush privileges;
可是启动应用还是报错 15355:20140820:132920.362 [Z3001] Connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)另,执行这个几条命令报错是啥原因cat ./create/schema/mysql.sql |mysql -uroot -pzhao@123 zabbix  
Warning: Using a password on the command line interface can be insecure.
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type=InnoDB' at line 6 cat ./create/data/data.sql |mysql -uroot -pzhao@123 zabbix             
Warning: Using a password on the command line interface can be insecure.
ERROR 1146 (42S02) at line 24: Table 'zabbix.config' doesn't exist

解决方案 »

  1.   

    给你移到mysql专区了
      

  2.   

    你的贴发到sqlserver专区,我帮你移过来而已,对应的问题发到对应的专区,不然回答的人很少,不是个个都同时会SQL Server和Mysql
      

  3.   

    请参考:http://blog.csdn.net/mchdba/article/details/24540017
      

  4.   

    报这个错误:: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)是用户名密码不对。
      

  5.   

    报这个:
    cat ./create/schema/mysql.sql |mysql -uroot -pzhao@123 zabbix  
    Warning: Using a password on the command line interface can be insecure.
    ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type=InnoDB' at line 6是语法不对,可以用  mysql -uroot -pzhao@123 zabbix   cacti_db <./create/schema/mysql.sql
      

  6.   

     但是我用mysql -uzabbix -p12345能够登录数据库的啊  
      

  7.   


    1,可是启动应用还是报错你是怎么启动应用的?2,cat ./create/schema/mysql.sql |mysql -uroot -pzhao@123 zabbix  你这里用的密码是 zhao@123 而不是之前的123456。
      

  8.   


    1,可是启动应用还是报错你是怎么启动应用的?2,cat ./create/schema/mysql.sql |mysql -uroot -pzhao@123 zabbix  你这里用的密码是 zhao@123 而不是之前的123456。我启动应用就是失败了,没成功。估计就是数据库权限错误 我知道的,123456是zabbix的密码,zhao@123是mysql root的密码
      

  9.   


    1,可是启动应用还是报错你是怎么启动应用的?2,cat ./create/schema/mysql.sql |mysql -uroot -pzhao@123 zabbix  你这里用的密码是 zhao@123 而不是之前的123456。我启动应用就是失败了,没成功。估计就是数据库权限错误 我知道的,123456是zabbix的密码,zhao@123是mysql root的密码可以参考,cacti安装详解,末尾有cacti用户的权限的grant sql语句:http://blog.csdn.net/mchdba/article/details/27120605