New Coder Posted March 11, 2009 Share Posted March 11, 2009 Hello All, Does anybody know how to schedule table optimisation and flush tables? Running mysql on windows server 2003. Can I use task scheduler? If so how?? Also does anybody have a detailed explanation to flush logs, hosts, privileges and status?? What do they do? What are the consequences(if any)? I've tried searching for an answer but only ever seem to find explanations on how to execute them... Many Thanks Quote Link to comment https://forums.phpfreaks.com/topic/148904-optimise-tables/ Share on other sites More sharing options...
Mchl Posted March 11, 2009 Share Posted March 11, 2009 Guess what is the first link, when you google for 'MySQL FLUSH' http://dev.mysql.com/doc/refman/5.0/en/flush.html Yes, you can use event scheduler to run mysql tasks. Quote Link to comment https://forums.phpfreaks.com/topic/148904-optimise-tables/#findComment-781906 Share on other sites More sharing options...
New Coder Posted March 11, 2009 Author Share Posted March 11, 2009 cheers, but the reason I ask is because I ran all commands on a test environment and after I was unable to connect to mysql through navicat. I had to rebuild mysql... So I was wondering if there was another set of commands I should run after flush. presumably it was flush privaleges that prevented the connection. Quote Link to comment https://forums.phpfreaks.com/topic/148904-optimise-tables/#findComment-782504 Share on other sites More sharing options...
Mchl Posted March 11, 2009 Share Posted March 11, 2009 FLUSH PRIVILEGES only causes the server to reload information from GRANT tables. Unless this information was changed, it shouldn't prevent you from connecting. Quote Link to comment https://forums.phpfreaks.com/topic/148904-optimise-tables/#findComment-782505 Share on other sites More sharing options...
New Coder Posted March 11, 2009 Author Share Posted March 11, 2009 Hmmm wierd this is the error I was recieving... Can't connect to mysql server on 'localhost' 10061 Search returned no plausable explanation. Got all sorts from firewalls to port incorrect/changed none of which were the case. So it's pretty safe to run all commands?? Can I/should I run them against the db called mysql also?? or just my production db's? How do I use the scheduler to run these commands? Sorry for the q's but I'm from a mssql background and have inherited the mysql responsibilty... Many Thanks Quote Link to comment https://forums.phpfreaks.com/topic/148904-optimise-tables/#findComment-782547 Share on other sites More sharing options...
Mchl Posted March 11, 2009 Share Posted March 11, 2009 In general you should leave mysql and information_schema databases on their own. FLUSH commands are usually used during administrative tasks such as backups. I don't know details unfortunately, as I'm not administering any mysql servers (except my local development server which hardly counts). Quote Link to comment https://forums.phpfreaks.com/topic/148904-optimise-tables/#findComment-782554 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.