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


相关推荐

  • SVN 树冲突解决详解

    SVN 树冲突解决详解

    2021年10月19日
    43
  • 【原创】PEST分析思维的一些基本思考与见解

    【原创】PEST分析思维的一些基本思考与见解数据说·思维季所谓不可能,只是现在的自己不可能,对将来的自己而言那是“可能”的。–稻盛和夫前言我们上篇内容,梳理和分享数据分析入门级思维—描述性分析思维,能让我们了解到数据信息的整体概况…

    2022年5月15日
    47
  • docker卸载命令_删除docker

    docker卸载命令_删除docker删除容器(jenkins官网提供的安装方式,删除比较特殊,因为jenkins自己创建了数据卷,所以要删除数据卷)不然,就算删除了容器,再运行镜像,以前的配置还是删不掉,运行的还是以前的配置首先,关停并删除jenkins容器dockerstop容器iddockerrm容器id然后,查看数据卷(如果是用挂载目录方式安装的jenkins的话,就不需要执行下面的步骤了)dockervolumels发现一个jenkins_home的数据卷,删除数据卷dockervolume

    2025年10月3日
    4
  • 查看Linux版本

    查看Linux版本

    2021年10月18日
    44
  • Git 当前项目设置 用户名、邮箱「建议收藏」

    Git 当前项目设置 用户名、邮箱「建议收藏」Git全局配置和单个仓库的用户名邮箱配置学习git的时候,大家刚开始使用之前都配置了一个全局的用户名和邮箱$gitconfig–globaluser.name“github’sName”$gitconfig–globaluser.email“github@xx.com”$gitconfig–list如果你公司的项目是放在自建的gitlab上面,如…

    2025年9月29日
    2
  • centos7.6安装docker_docker自动部署多环境

    centos7.6安装docker_docker自动部署多环境前言前面一篇学了mac安装docker,这篇来学习在linux上安装docker环境准备Docker支持以下的CentOS版本,目前,CentOS仅发行版本中的内核支持Docker。Doc

    2022年7月30日
    6

发表回复

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

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