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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • java删除linux文件_Java删除文件

    java删除linux文件_Java删除文件//将缓冲文件夹中的文件删除Strings=”D:\\txt\\inBuffer\\”+fileInfo[0]+”\\”+fileID;//文件的绝对路径Filefile=newFile(s);if(file.exists()){booleand=file.delete();if(d){System.out.print(“删除成功!”);}else{System.out…

    2022年6月14日
    102
  • java setproperty 未生效_Java System类setProperty()方法及示例[通俗易懂]

    java setproperty 未生效_Java System类setProperty()方法及示例[通俗易懂]系统类setProperty()方法setProperty()方法在java.lang包中可用。setProperty()方法用于将给定参数(system_property)表示的系统属性与给定另一个参数(system_property_value)一起设置。setProperty()方法是静态方法,因此也可以使用类名进行访问。setProperty()方法方法在设置系统属性时会引发各种异常Sec…

    2022年7月12日
    69
  • PID控制算法的C语言实现

    PID控制算法的C语言实现前言最近在学习PID算法,在了解了算法的套路以后,就要进行实验。如何用C语言实现呢?在网络搜索发现了一篇很好的博客,不过里面的数据又臭又长。在这里转载过来,重下新整理了一下。(原文链接)整理中发现,原文参考的原理在工业应用中PID及其衍生算法是应用最广泛的算法之一,是当之无愧的万能算法,如果能够熟练掌握PID算法的设计与实现过程,对于一般的研发人员来讲,应该是足够应对一般研发问题了,而难能可…

    2022年6月6日
    28
  • 开源 串口调试助手 BaoYuanSerial 使用教程「建议收藏」

    开源 串口调试助手 BaoYuanSerial 使用教程「建议收藏」简介:软件使用.Net5+Avalonia实现跨平台方案。支持LinuxUbuntu,Windows,已在Ubuntu20.04,Win10Professional20H2测试通过。官方下载地址:项目地址:xuyuanbao/BaoYuanSerial:AGUISerialDebugToolforLinux/MicrosfotWindow(github.com)下载地址:ReleaseBaoYuanSerila-V1.1·xuyuanbao/BaoYuanSer

    2022年4月30日
    103
  • 重启MySQL服务(怎么重启mysql服务)

    重启MySQL服务(怎么重启mysql服务)一、MYSQL服务我的电脑——(右键)管理——服务与应用程序——服务——MYSQL——开启(停止、重启动)二、命令行方式Windows1.点击“开始”->“运行”(快捷键Win+R)。2.启动:输入netstopmysql3.停止:输入netstartmysql提示*RedhatLinux也支持servicecommand,启动:#servicemysqldstar…

    2022年4月18日
    257
  • matlab的求和符号_matlab中求和符号怎么表示

    matlab的求和符号_matlab中求和符号怎么表示做数学方面学术得,经常遇见双重求和符号的情况,并且内层求和往往与外层相关,笔者在这里写了个简单的程序,希望能起到抛砖引玉的作用。如下:思想很简单就是双层循环N=100;form=1:Nfori=0:m-1f=f-exp(-a*T)*((a*T)^i)/factorial(i);endendf=f+N…

    2022年10月11日
    3

发表回复

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

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