MySQL error 1449 reappearing even though definer was set to resolve initial error? - sql

On Monday I messed up with a database.
We have an application running on a VPS, using cPanel and phpmyadmin, and I informed the developers I will be doing some queries on the DB to extract information.
So, I did a few large queries using the "Visual Builder" query tool and the web-application got stuck. The queries weren't loading and even refreshing the page did not work. The website wasn't loading and users couldn't log in. So I used WHM to log in as root and kill the queries manually. After I did this, the system was still not running.
Then, the database completely freaked out and I got these error messages:
After doing this, the DB somehow fixed itself and the web application was working again. However, we saw that we could not update some jobs or add new jobs in the system. If you pressed the "SAVE" button on a job, the system just gave an "undefined" message.
The developers had a look and discovered this was causing the issue:
[
The devs went ahead and added the definer and the issue was resolved. The blacked out "user"#1.0.0.0" is the actual cPanel account username.
However, this did not last as yesterday evening the exact same situation was occurring. The web-application was running fine on Tuesday and most of Wednesday, then all of a sudden users couldn't update their jobs again which means the definer user was removed once again even though nobody did anything in the database.
Has anyone encountered this issue before? I read this thread on the topic and even though what they say makes sense, I believe the developers did this but the error still occurred.
When I log into phpmyadmin via cPanel, I get a weird user called "cpses_234ikjih#localhost.com". Does this perhaps have something to do with this error? I believe before the server went crazy, this user was only the name of the cPanel account (for example: "cPanelAccountName#localhost.com".

To summarize your post, what I'm seeing is that you have a MySQL user, the user disappeared, you recreated the user, and it went away again.
There must be some external factor here. Someone could have access to your database and is deleting the user maliciously or out of misunderstanding, there could be a scheduled job, or it could be something to do with your web host.
I'd start by auditing the database accounts, and restricting access as much as possible. Check any interface that's exposed to the web, such as WordPress, Joomla, or other applications.
You should enable logging, there are several degrees of logging that MySQL can allow. I think the most useful for you would be the audit log, although honestly I've never used that specifically. You'd enable that to log future events. The binary log may contain record of what has already occurred.

SOLVED
I managed to solve this by changing MySQL database password and cPanel account password.
I read one post by someone saying that there was a session file which perhaps stored an old session and that changing passwords could resolve this. Luckily it did, have not had the error 1449 appearing for 5 days now.

Related

Error in processing request Error Code: 200 - through cPanel, myphpadmin. After been hacked

I'm using cPanel with myphpadmin SQL Database and Wordpress, and I got hacked!
I have managed to restore the wordpress website from a backup. I have restored the database along with all the files. I did through the restore in cPanel.
I wanted to check the SQL DB and make sure the user name of the hacker was gone. As it showed up in the WP users. Wordfence alerted me that a user was created outside of WP.
When I try to access the 'myphpadmin' in different browsers (it makes no difference) I get this error...
"Error in processing request Error Code: 200 Error text: OK (rejected)
It seems that the connection to server has been lost. Please check
your network connectivity and server status."
I have tried contacting my server, they seem hopeless. They keep telling me to reach out to Sucuri. But I can't afford their service. Besides, with some direction, Im sure I can manage it. I just need to get past this error.
After I click on the DB that is located to the left of this message in left pane. I get like unformatted page. its so strange.
I've looked up online, there are solutions using WAMP but not through cPanel.
I added an image of what it looks like after I click the DB name.
How can I solve this problem?

Failed User Login | Drupal 8

I have developed a website in Drupal 8 and have deployed it to production. I have created 7-8 other accounts for my content management team and have granted them limited privileges for creating, editing and deleting content.
Of late, I am facing a problem with the user login form, wherein the login works sporadically. Sometimes I am able to log in as the administrator in the first attempt, sometimes I am not. In the latter case, I have to reset my password via email using the reset password option. However, this approach works only temporarily for a single session, which means that as soon as I log out, I am unable to log in. My content managers are also experiencing the same problem.
I have tried the below things but no luck.
Truncating the flood, session, and all the cache tables and flood table manually from the database.
Disabling the Recaptcha module in the login form.
Enabling and disabling the HTTP Basic Authentication module.
Disabling server proxy configuration through the settings.php file.
Performing Drupal updates by running the update.php file.
The incorrect username and/or password error in the login has not been handled. When an incorrect username/password is entered the page only refreshes without displaying any custom message.
Edit: I have just observed that I had luckily forgotten to log out as the super admin on the site from another browser, Firefox. I investigated further to fix this problem and observed a pattern. I am able to login as the administrator when I manually clear the cache from Firefox (where I luckily forgot to logout). However, this works only for one session, which means after logging out the bug reappears. In order to make the login to again work as expected, I have to again clear the cache from Firefox.
Okay, after much banging my head over the wall for nearly a week, I have found a workarpund solution to this problem by uninstalling Internal Dynamic Page Cache and Internal Page Cache modules.
The problem was that the user login form was getting cached after one successful login. Using the Chrome developer tools the following response header was getting set and sent by Drupal.
X-Drupal-Dynamic-Cache: HIT
To elimnate this I had to uninstall the above two modules.
However this is just a workaround and not a solution, since disabling these two modules will have a tradeoff with the site performance.
Anyone who knows the solution to this problem, please post it here. I shall try them and update this space.
Thank you in advance.
I had issues in local environnement with a custom Login form too. The behaviour was different because for me.
It was the first login attempt just after clearing the cache drush cr that would fail, even if in the logs it was recorded that the user was successfully logged.
I fixed it in my Controller, by using a bit of code from the Core core/modules/user/src/Plugin/Block/UserLoginBlock.php
$form = $this->formBuilder()->getForm('Drupal\user\Form\UserLoginForm');
$placeholder = 'form_action_p_4r8ITd22yaUvXM6SzwrSe9rnQWe48hz9k1Sxto3pBvE';
$form['#attached']['placeholders'][$placeholder] = [
'#lazy_builder' => ['\Drupal\user\Plugin\Block\UserLoginBlock::renderPlaceholderFormAction', []],
];
$form['#action'] = $placeholder;
$build['user_login_form'] = $form;

Unable to connect to LDAP server - backend logging in issues (Joomla)

I've been unable to login to my site for weeks and weeks now. I've tried everything I can find on forums and still no joy (eg: viewtopic.php?t=719540).
A few weeks back my Joomla site backend became unavailable with the error message "Unable to connect to LDAP server".
I have not updated or changed the site in quite a while. It just started happening. So I've ruled out anything I have done.
I will say the exact steps I have taken:
In phpMyAdmin, accessed 'jos_extensions' and then 'plg_authentication_ldap'. Changed 'enable' from '1' to '0'.
Accessed 'jos_extensions' and 'plg_authentication_joomla' and ensured it was enabled. ie '1'.
Accessed 'jos_users' and found out I'd been hacked with many new users (with names like 'habxnkxl') had been added. All passwords were changed to things like 'jnsnbjhbx'. I removed all the unwanted users and changed all passwords for users.
Followed the steps in 'how to recover your password page' (http://docs.joomla.org/How_do_you_recover_or_reset_your_admin_password%3F) and created a new super user 'admin2'.
edit
Now, 'repaired' jos_extensions, jos_users and deleted plg_authentication_ldap.
I've consistently been re-checking the login throughout the process, on firefox and safari, and still get the same "Unable to connect to LDAP server" error message. Even when I have turned off 'plg_authentication_ldap".
Your help in this matter would be greatly appreciated.
Thanks,
Nicol
Joomla 2.5
Set :
Client id 1
Enabled 1
Access 1
This worked for me :)

SharePoint 2010: Errors not showing up in diagnostic log

I am having an issue with the error logging in our development SharePoint 2010 box. This is a new install. When working on an application page, I had an error and went to the logs. Pretty much every other thing in the world is in the logs except for my error(s). I looked for the correlation ID and time and nada.
I've followed tutorials on how to configure the diagnostic logging. This is similar to another StackOverflow post, however the solution isn't working for me and I'm trying ti revive the thread. We have a stanging machine that I was working on until the dev machine was up and the logging worked fine there. I used that as an example and set the SharePoint Foundation and SharePoint Server categories to Error and Medium (I've even set them both to Verbose) with no result.
Anyone else have an issue with this?
I figured out the problem. Someone told me to make sure the SP webapplication AppPool account is part of the "Performance Log Users" group. After much back-and-forth, I checked the Performance Log Users group and it was EMPTY! I put in my AppPool service account and farm account into that group and also I had to assign the "Log on as a batch job" user right to the Performance Log Users group. It's been logging ever since. :-)

Getting login failed for sa when I haven't changed the password

I've been developing a winforms app tied to sql server. I haven't rebooted in a while. Today i rebooted and now I can't log into sql. I used every account I know and their passwords including one that was working just before i rebooted and i get a 'Login failed' . I did take the database I use offline just before starting and I do have backups before then.
thoughts on what happened? Is there a way to bring the database back online OR somehow find out what passwords are? I even tried using windows authenication with me as an admin on the box AND sa (Yes, bad) and still no dice.
:-/ That's a rough place to be ... I wish you luck. Check out this blog post, not sure if you're using sql 2k5 or not, but if so, it may be helpful:
http://blogs.msdn.com/raulga/archive/2007/07/12/disaster-recovery-what-to-do-when-the-sa-account-password-is-lost-in-sql-server-2005.aspx
Have you checked to make sure that the service is actually running? Also are you trying to connect using IPC, TCPIP or named pipes? Whichever way make sure it's enabled in the configuration tools.
Since admin's on the box are SQL admins the only thing I can think of is that the service is not running.