MySQL 403 forbidden error - mysql

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:

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.

Getting HTTP error 500 even if the account is authorised

Having an issue with the database enabling on my cpanel.
I am using A2Hosting.
As I create the tables I get this error when I go to a page that uses it:
To try and fix this I added privileges to my account
here is my database code:
<?php
class config_db {
public function init() {
PDO('mysql:host=localhost;dbname="DATABASENAME";charset=utf8', '"USERNAME"', '"PASSWORD"');
return $db;
}
}
?>
After adding privileges I get this error:
Not sure why I still get an HTTP ERROR 500 after I have granted privileges
UPDATE:
As I checked one solution is to delete the plugins, but my cpanel files has none of it
UPDATE:
Creating a username and password that the database uses uniquely does not work either
UPDATE:
Deleting the .htaccess folder gets me a 404 not found problem
UPDATE:
There are no errors shown using inspect element or event in the cpanel
UPDATE:
The database is connected succesfully as I checked but the error 500 still persists
In A2Hosting please make sure you are using the correct database name. As per the documentation it should be:
When you create a database, your username is prefixed to the database name.
For example, if your username is abc, and you create a database named db, the actual MySQL database name is abc_db.
For more information:
https://www.a2hosting.com/kb/cpanel/cpanel-database-features/managing-mysql-databases

Issue with connecting to database on Wordpress

I am trying to get Wordpress up and running but I get the "Error establishing a database connection" page pop up.
Here is the setup and what I've done:
I have a server running Wordpress fine. I took a snapshot from the AWS volume that had the wp-config.php information from the running server and spawned a new server with a volume that is snapshotted. I've checked all my settings and it all looks fine.
On the SQL sever side (MYSQL), I added the new IP with all the correct username/passwords so the database server will allow it to connect. I also have put print statements while wordpress tries to load the database. The values returned are all correct. Based on some threads I read, I also deleted my wp-config file and re-copied it from the original server.
I also made sure the permissions are correct. Any other suggestions on what I could be missing?
I was able to fix this. The issue had nothing to do with Wordpress or the server, but with MYSQL. The database have Schema privileges and I hadn't set it for my new IP address. Adding the privileges fixed the issue.

Migrating Wordpress database to server SQL error

I have just finished a Wordpress site and I'm trying to set it up on the server. I did the following, as always:
uploaded a .htaccess file to a public_html folder with the text from https://codex.wordpress.org/htaccess (basic WP)
moved all the contents from the local wordpress folder to public_html
exported my local database and changed all instances of 'localhost/siteName/wordpress' with 'www.siteAddress.com'
created a mySQL database in cPanel's mySQL section
created a new user in cPanel's mySQL section
changed the wp_config file so that db_name, db_user and db_password values mach the prefix_name, prefix_username and user password of the newly created db/user
added that user to the database with all privileges granted
TRIED to import the exported local database to server via cPanel's phpMyadmin section. That's where I got this error:
1044 - Access denied for user 'something'#'localhost' to database 'else'
Of course, 'something' and 'else' are not the real values... Can anyone tell me if I did something wrong, or I didn't do something else at all? I never had this problem before? The differences are that the Wordpress itself got updated in the meantime and I worked with WooCommerce for the first time... if it matters, though I suspect it doesn't.
Thanks in advance, I know it's a bit of reading :)
[EDIT]: I tried the same procedure again (third time in a row), and it worked... so, the solution would be - the question itself.
Take a look at this dzenesiz and see if this helps.
http://www.inmotionhosting.com/support/website/database-troubleshooting/mysql-1044-access-denied-error-message

phpmyadmin privileges only working on some databases

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