phpmyadmin privileges only working on some databases - mysql

When I use PHPMyAdmin to edit or delete a record I am getting an error saying "You don't have permission to access /phpmyadmin/sql.php on this server." But this only happens in some databases. I am the only user according to PHPMyAdmin and through the command prompt on my Linux box.
First off I've changed the PHPMyAdmin access folder because my access logs were showing others trying to get in. Logs don't show any successful attempts.
It was working until today...Now it throws the error. I can still add and drop tables completely, just not edit a record, in two of the five databases. Also I've checked into the user privileges and there doesn't seem to be an issue there.
Anyone have an idea?
EDIT: I have narrowed this down to a conflict between mod_security and PHPMyAdmin, now off to Google to find the solution,
Thanks

What I did was I opened modsecurity.d/modsecurity_crs_47_common_exceptions.conf and added the following to the bottom:
SecRuleEngine Off
And viola it fixed all the issues

Related

The user specified as a definer does not exist - GRANT doesn't fix

After years of no problems with my PHP webapp running MySQL 5.5 on the backend, suddenly today I'm having permissions problems.
Whenever I try to run an INSERT statement (either from PHP or from Workbench or Heidi), I get this error message: The user specified as a definer ('my_user'#'1.2.3.%') does not exist
One symptom is that INSERT statements cannot be executed by my PHP nor by remote clients such as Workbench or Heidi. I have tried various solutions suggested by:
MySQL error 1449: The user specified as a definer does not exist
Error: 1449, "The user specified as a definer ('root'#'localhost') does not exist"
Everything points to running a GRANT statement. I have tried various GRANTs as suggested, but I always get this error:
Access denied for user
It seems like my permissions got corrupted or something. So I created a brand new DB user inside BlueHost control panel on my VPS and gave full privileges. I get the same exact errors on this brand new user.
BlueHost support has no idea what to do.
Some Stack articles say to go mess around with TRIGGERS or STORED PROCS permissions - but I don't have any of these types of objects. Simple INSERT statements cause this error, and perhaps UPDATEs as well, but I'm not sure of that at this moment.
The user has FULL PRIVILEGES, as always.
What else can I try? Is there some way to fix corrupted permissions? I can run SELECT statements with no problems.
I tried connecting to the DB with root (using the same pwd as I use when connecting to WHM), but it didn't like my password or maybe the user in general. I never set up root as a specific user against this DB and I'm not sure that's a good idea. I have always used a specific user created just for this DB. Again, past 5 years no problems at all. The DB has not been upgraded, no DB changes, no user changes, nothing.
I sort of solved it. I ended up creating a new database with a different name, and created a new admin user to go with it. Then I ran my db backup/dump script against it. Everything works perfectly again, with this new DB. The old DB is still jacked.
I'm thinking that permissions got corrupted in the old database.

EasyPhp - Receive "Missing Plugin" Error When Attempting to Grant Permissions

I've just installed EasyPHP and in the MySQL section I created a new user called "foo" and checked the box to give it all privileges. When I click on the tab to manage the MySQL user accounts the user "foo" is there. But it shows foo's level of privileges only as "USAGE", and when I mouseover that word it says, "no privileges".
So I tried to update the privileges for foo. But when I try to edit them I get the error
"#1524 - Plugin '*E394918EB0645561038DD951D0CABA8042DDFE14' is not
loaded".
Interestingly, when I go back to the tab for user accounts and mouseover the "root" user it states
"Includes all privileges except GRANT"
Maybe this is why it can't grant "foo" any privileges?
Any idea how to give "foo" all privileges? I'd like to use that as my development account.
PS At the bottom of that page there is a message that says: "
Note: phpMyAdmin gets the users' privileges directly from MySQL's
privilege tables. The content of these tables may differ from the
privileges the server uses, if they have been changed manually."
Could this be a possible solution, and if so, could someone share a link that shows how to change the MySQL privilege table manually?
OK, after hours of searching around I'm getting much closer to a solution.
It turns out that there is an error in the EasyPHP installation package that is related to changes from earlier versions of MySQL. Here is the workaround:
(1) Open the file:
:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-binaries\dbserver\mysql5711x86x160717165359\my.ini
(2) Add this line at the end and then save the file:
show_compatibility_56 = on
(3) Restart the MySQL server from the EasyPHP dashboard.
Oh yes, I also ran the following upgrade from the MySQL command line:
mysql_upgrade -u root -p
This has cleared up some errors which showed up in other tabs that I didn't mention, such as not having permission to access the server status and not being able to get a list of the MySQL variables.
I still would like to solve the original problem but have spent too much time on this initial stage to work on it tonight. If anyone has info that please post.
I had the same issue. What I did to fix it was quite simple.
Exit EasyPhp.
Navigate to directory **\EasyPHP-Devserver-17\eds-binaries\dbserver\mysql5717x86xxx\data**
Find and remove the following files with ext .frm & .ibd
innodb_index_stats
innodb_table_stats
slave_master_info
slave_relay_log_info
slave_worker_info
After navigate to directory \EasyPHP-Devserver-17\eds-binaries\dbserver\mysql5717x86xxx\bin
Open command prompt and type
mysql_update -u root -p
<BLANK>
Afterwords you should see MySQL update, aswell as some of easyphp's files.
Exit mysql terminal, and start EasyPhp again.
Hope that helps!

MySQL 403 forbidden error

I'm attempting to delete certain data from a table and this is what happens...
Error in processing the request.
I have no idea about what may be the cause.
I've reuploaded the whole phpmyadmin .zip to my site
I've created a clone database and added the same user to it
I've added all privileges to the user that manages the database
I've created a new user with all privileges to manage the database
None worked... The strange thing is that when I access the database from Cpanel I can do everything normally, this issue only happens when I access from my site.
Image with error:

Followed adwice for err 1045 but new problems Have made Grant statement too

wamp local
Lost contact with all dbases except one which I can log in to. In that DB my password is on a databas level and not a grant user. I have checked all earlier answers. First I did get error 1045 and took the advice given to use "cookie" instead of config in phpmyadmin config.inc
Logged in to phpmyadmin and got two other errors
needs a secret blowfish..??
Something wrong in config file. Doesn't say which and no more info
Fixed them(realy dont know how)
Have made The grant privileges statement for root.
Now I can come in with root user bud also every other user with or without password.
Then I can see my databases and tables(only titles)
I have checked that my DB files are still under the folders(msql bin data)
Got a message Before about something wrong in the config file. Checked it several times(config.inc.php) without seeing anything suspect.
Please... What to do?
I'm not really sure what your question is. It sounds like you worked through items 1 and 2. Sounds like you're logging in as root (as expected) and as the anonymous user (that's "every other user with or without password"). You can restrict that by removing the anonymous user (log in as root and click on the Users tab).

MySQL and PhpMyAdmin config.inc.php Password issue on MAMP

This is a very strange issue that is similar to a few other people issue that has been going on for a while with MAMP.
I recently upgraded to MAMP2 and followed the instruction for the new phpMyAdmin and it work for a while but recently whenever I try to connect to MySQL I always get this error:
Error: Could not connect to MySQL server!
/Applications/MAMP/Library/bin/mysqlcheck: Got error: 1045: Access denied for user 'root'#'localhost' (using password: YES) when trying to connect
So I changed the password to the correct one and changed all the files as per advised on this forum topic: http://forum.mamp.info/viewtopic.php?f=2&t=11974.
But it did not work at all. I realized that there was two phpMyAdmin folder on my Mac one which is in
/Applications/MAMP/Library/bin/phpMyAdmin
and the other one in
Library/Application Support/appsolute/MAMP PRO/phpMyAdmin
In the first folder the config.inc.php as the correct credential for the user, however the second as root for both username and password. Obviously I tried to changed that but to no avail, the file is somehow always reverted to the default credential.
Did someone ever had this issue? is there a way to solve this?
I forgot to update this, if anyone is interested I got the fix for this (and I know many people had a similar issue).
In mamp.pro.global.preferences.plist is listed the encoded MySQLRootPassword, if like me you did update of your MAMP overrite this password field with your old one and there you have it, it works !
The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. Find out why.
Or alternately go to 'Operations' tab of any database to set it up there..