mysql错误代码1142_mysqldump命令

mysql错误代码1142_mysqldump命令I’mhavingtroubleswithacertainqueryononeofmyservers.OnallotherplacesI’vetestedititworkscompletelyfinebutontheserveriwanttouseititisn’tworking.It’saboutthefollowing…

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE稳定放心使用

mysql错误代码1142_mysqldump命令

I’m having troubles with a certain query on one of my servers. On all other places I’ve tested it it works completely fine but on the server i want to use it it isn’t working.

It’s about the following SQL:

SELECT facturen.id AS fid,

projecten.id AS pid,

titel,

facturen.totaal_bedrag AS totaal,

betaald,

datum

FROM facturen,

projecten

WHERE facturen.project_id = projecten.id

AND projecten.eigenaar = ‘1’

ORDER BY datum DESC

This is the error code I get from it:

SELECT command denied to user ‘marco’@’localhost’ for table ‘projecten’

The tables:

facturen:

CREATE TABLE IF NOT EXISTS `facturen` (

`id` int(11) NOT NULL auto_increment,

`project_id` int(11) NOT NULL,

`datum` int(11) NOT NULL,

`lever_datum` int(11) NOT NULL,

`totaal_bedrag` decimal(9,2) NOT NULL,

`btw` decimal(9,2) NOT NULL,

`bedrijf` varchar(40) NOT NULL,

`contactpersoon` varchar(60) NOT NULL,

`adres` varchar(60) NOT NULL,

`postcode` varchar(7) NOT NULL,

`plaats` varchar(30) NOT NULL,

`betaald` int(11) NOT NULL,

PRIMARY KEY (`id`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=201200006 ;

projecten:

CREATE TABLE IF NOT EXISTS `projecten` (

`id` int(11) NOT NULL auto_increment,

`titel` varchar(80) NOT NULL,

`eigenaar` int(11) NOT NULL,

`creatie_datum` int(11) NOT NULL,

`eind_datum` int(11) NOT NULL,

`totaal_bedrag` decimal(9,2) NOT NULL,

`btw` decimal(9,2) NOT NULL,

PRIMARY KEY (`id`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=201200004 ;

The strange part is that every other query on both the ‘projecten’ table and the ‘facturen’ table works completely fine, also this query works fine on two other servers of mine.

解决方案

You need to grant SELECT permissions to the MySQL user who is connecting to MySQL

see answers of the link ;)

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/187222.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • Tomcat报错—Tomcat内存溢出及大小调整

    本文记录一些常见的Tomcat经常出现的内存溢出问题,在查询大量数据和加载jar包出现异常。

    2022年2月24日
    46
  • AndroidO(8.0) 和 Android P(9.0)

    大早上躺床上就索性百度了下p和o发现百度百科的说明还是很简洁易懂的2017年8月22日,谷歌正式发布了Android8.0的正式版,其正式名称为:AndroidOreo(奥利奥) 。奥利奥版安卓的聚焦重点是电池续航能力、速度和安全,让用户更好地控制各种应用程序,加大了对App在后台操作的限制。这种限制在一定程度上延长了安卓机在“睡眠”(Doze)模式下的电池的续航能力,它让不在使用的App进…

    2022年4月7日
    43
  • 两种方法在VMware中安装VMware Tools

    两种方法在VMware中安装VMware ToolsVMwareTools的主要作用是虚拟硬件的驱动,鼠标的无缝移出移入,剪贴板共享,共享主机上的文件夹等功能。 方法一1.打开文件夹-Ubuntu17.10amd64(根据自己版本来看)。2.在VMwareWorkstation主界面点击菜单“虚拟机”。会弹出提示框,点击是。3.保持网络状态,等待后台下载,下载后会出现一个压缩包。在下载过程中可能会出现DVD图标…

    2022年5月26日
    38
  • 数据库课程设计———–学生选课管理系统的设计「建议收藏」

    数据库课程设计———–学生选课管理系统的设计「建议收藏」由于时间关系,里面许多图片都已经变形或错位    课程设计(学年论文)     题目:学生选课管理系统的设计与实现                              系   院    计算机科学技术系  专   业    计算机科学与技术  班   级   姓   名     学   号

    2022年5月19日
    78
  • BT渗透「建议收藏」

    BT渗透「建议收藏」PHP交流群:294088839,Python交流群:652376983 whois域名/ip查看域名的详细信息。ping域名/ip测试本机到远端主机是否联通。dig域名/ip查看域名解析的详细信息。host-l域名dns服务器传输zone。扫描nmap:-sS半开扫描TCP和SYN扫描。-sT完全TCP连接扫描。-sUUDP扫描-PSs…

    2022年4月29日
    52
  • python之路

    python之路

    2021年9月15日
    88

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号