ifsnop / mysqldump-php

PHP version of mysqldump cli that comes with MySQL
https://github.com/ifsnop/mysqldump-php
GNU General Public License v3.0
1.25k stars 300 forks source link

SQLSTATE[42000]: Syntax error or access violation: 1227 Access denied; you need (at least one of) the SUPER privilege(s) #81

Closed iqbalmalik89 closed 9 years ago

iqbalmalik89 commented 9 years ago

Hello,

I am facing this error on remote server.

SQLSTATE[42000]: Syntax error or access violation: 1227 Access denied; you need (at least one of) the SUPER privilege(s)

ifsnop commented 9 years ago

Could you paste your calling parameters ? El 26/06/2015 07:15, "Muhammad Iqbal" notifications@github.com escribió:

Hello,

I am facing this error on remote server.

SQLSTATE[42000]: Syntax error or access violation: 1227 Access denied; you need (at least one of) the SUPER privilege(s)

— Reply to this email directly or view it on GitHub https://github.com/ifsnop/mysqldump-php/issues/81.

iqbalmalik89 commented 9 years ago

Here is my code. I am using Lumen.

    try {
        $dump = new IMysqldump\Mysqldump(env('DB_DATABASE'), env('DB_USERNAME'), env('DB_PASSWORD'));
        $dump->start(\Utility::getRoot('backup').$backupFile);
    } catch (\Exception $e) {
        echo 'mysqldump-php error: ' . $e->getMessage();
        return false;
    }
ifsnop commented 9 years ago

Please update mysqldump-php to the latest version. A fix (https://github.com/ifsnop/mysqldump-php/commit/8e5c9df771a882cf96ee002191510728b2b8a948) was pushed a year ago that changed GLOBAL to SESSION, which doesn't requiere SUPER privilege.