dl5ark1 Posted October 24, 2015 Share Posted October 24, 2015 Hello, could you please restore the following databases: user: dl5arkserver: stevie databases:dl5ark_rootdl5ark_blitzortung Link to comment Share on other sites More sharing options...
Tjoene Posted October 24, 2015 Share Posted October 24, 2015 This support request is being escalated to our root admin. Link to comment Share on other sites More sharing options...
Krydos Posted October 24, 2015 Share Posted October 24, 2015 Seriously? dl5ark_blitzortung: 2.4G Also, dl5ark_root doesn't exist, but you do have dl5ark_smart\@002dhome. Link to comment Share on other sites More sharing options...
dl5ark1 Posted October 25, 2015 Author Share Posted October 25, 2015 Yes, please restoredl5ark_blitzortungdl5ark_smart-home Link to comment Share on other sites More sharing options...
Krydos Posted October 25, 2015 Share Posted October 25, 2015 The database dl5ark_smart-home should now be visible to your root mysql account. You may need to delete, recreate, and reassign permissions to any database users that should have access to the affected database. If phpmyadmin doesn't log in properly or you don't see the database there change your account password and this should sync up the mysql/cpanel passwords. Let us know if you're still having any issues accessing your data. dl5ark_blitzortung by itself exceeds your total account storage by 480%. What are your plans to reduce its size? Link to comment Share on other sites More sharing options...
dl5ark1 Posted October 25, 2015 Author Share Posted October 25, 2015 Please restore the empty database dl5ark_blitzortung. Link to comment Share on other sites More sharing options...
Krydos Posted October 25, 2015 Share Posted October 25, 2015 dl5ark_blitzortung has been restored in its entirety, but you need to clear out some of the data yourself as soon as possible. I'll check back on it in a few days to make sure it's 500mb or less. I would also highly recommend you add some mechanism for deleting old data to make sure this doesn't happen again. Perhaps a weekly cron that runs a script which deletes all entries older than X days or something? I'll leave the implementation up to you. Ridiculous databases like yours are part of the reason Stevie mysql has been so unstable lately. Let us know if you need any help with how to clean up the database, or implementing ways to keep your databases sane in the future. Link to comment Share on other sites More sharing options...
dl5ark1 Posted October 25, 2015 Author Share Posted October 25, 2015 Thanks for your work. I have drastically reduced the size of the database. Please let me know how you would implement the deleting function for the table mybo_strikes in this databse (entries older than 42 days). Link to comment Share on other sites More sharing options...
Krydos Posted October 25, 2015 Share Posted October 25, 2015 dl5ark_blitzortung: 5.0M Looks much better. DELETE FROM dl5ark_blitzortung.mybo_strikes WHERE time < DATE_SUB(NOW(), INTERVAL 42 DAY); should work. Obviously you should run it as a SELECT first to make sure it's working correctly. Also make sure you don't typo 'DAYS' instead of 'DAY'. I always do that because '42 DAY' isn't grammatically correct English, but it will throw an error. If it was me I'd put that query into a php script, and then call it once in a while with a cron. You can also just add it to your script that inserts the data and that will be a bit simpler. Link to comment Share on other sites More sharing options...
dl5ark1 Posted November 15, 2015 Author Share Posted November 15, 2015 DELETE FROM dl5ark_blitzortung.mybo_strikes WHERE time < NOW() - INTERVAL 42 DAY;works (today) with "0 Datensätze gelöscht. (Die Abfrage dauerte 0.0225 Sekunden)".But when i run this within Heliohost Cron Jobs i get/usr/local/cpanel/bin/jailshell: -c: line 0: syntax error near unexpected token `('/usr/local/cpanel/bin/jailshell: -c: line 0: `DELETE FROM dl5ark_blitzortung.mybo_strikes WHERE time < NOW() - INTERVAL 42 DAY' Link to comment Share on other sites More sharing options...
Krydos Posted November 15, 2015 Share Posted November 15, 2015 A cron runs on the command line, not within MySQL. The easiest way to accomplish what you're trying to do is create a php file that runs that delete query with a name like cron.php. Then the cron command would be something like php /home/dl5ark/cron.php Link to comment Share on other sites More sharing options...
Recommended Posts