表“表”不存在


Table 'table' doesn't exist

我在MySQL连接上遇到了问题。连接会根据用户而变化。当我与数据库连接时,它可以工作,但是如果我尝试与另一个IP连接,则会收到错误:

An exception occurred while executing 'SELECT codigo_equipo, ti.codigoTipoIncidencia as tipo_de_incidencia, count(codigo_equipo) as cuenta FROM
AYTOGRANADA_BD.incidencias_resumen a INNER JOIN nmgi_gestion.subtipos_incidencia st ON st.idSubtipoIncidencia = a.idSubtipoIncidencia
INNER JOIN nmgi_gestion.tipos_incidencia ti ON ti.idTipoIncidencia = st.idTipoIncidencia
where fecha_inspeccion>='2015-06-14' and fecha_inspeccion<'2015-06-15' group by codigo_equipo':
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'AYTOGRANADA_BD.incidencias_resumen' doesn't exist 

数据库的结构是相同的,如果我从phpmyadmin服务器进行此查询,它说"那里",我返回它没有问题。问题可能是MySQL权限吗?

谢谢

要连接的代码:

$params['host'] = "XX.XX.XX.XX";
$params['dbname'] = "AYTOGRANADA_BD";
$params['user'] = "root";
$params['password'] = "XXXX";

我认为您的根用户只有本地访问权限。

尝试在本地执行:

show grants;

您可能会看到类似授予对 的所有权限TO 'root'@'localhost'