MySQL – Best way to remove all data from a table

girl holding stop sign

There are multiple ways in which to remove all data from a MySQL Table.

The first is to use the DROP TABLE command, which will remove the entire table with data.  This basically removes the entire table, you will not be able to recover the structure or data.

The second is DELETE * FROM Table which will remove the data,  leaving the auto-increment values alone, as well as the rest of the table structure.  This method is very slow on large tables using Innodb.  This is because each record has to be written to the log.  In general, you should never use this method to remove all data from a table.

The third method is to issue a TRUNCATE TABLE command which will quickly remove all the data from the table, reset the auto-increment values (but leave them as auto-increment columns, so they will just start at 1 and go up from there again).

Lastly, you can use the nuclear option, which is as follows :

mysqldump -ppassword YourDBName YourTblName –no-data dumpfile | mysql dumpfile

This will drop the table, and then recreate it all from scratch.


Mystery Missile Solved! Obviously AWE808 from Hawaii

Once again the news agencies prove incapable of actually doing some basic research to identify the “Mystery Missile”.  Ten minutes of Google searching will give you access to many sites that have very similar pictures as those seen with the Mystery Missile.   Once you actually see these contrails from multiple locations, it is clear that the “Mystery Missile” was simply a plane contrail that you can see everyday if you look closely enough.  No conspiracy, no military hoax, not connected to cruise ships breaking down in the ocean.  Just a simple plane traveling from Hawaii to Phoenix, which it does everyday.

The picture above shows the exact same “Missile Launch” 24 hours later.

For more information, check out this great web site.

Think about it, you have two choices :

Option 1 – An airliner with a contrail, made to look thicker than usual because it is flying towards the camera, and appearing to “come out of the sea” because it came from over the horizon. Data for this includes several known simiar examples, a known flight in the area doing the right path at the right time, and lack of anything unusual on FAA ATC tapes.

OR

Option 2 – An unknown SLBM launch undetected by anyone, evidence for which is “I seen some rocket launches and they look like this – honest”.


Lotus Elise Suspension Settings

girl with a wrench

Torque Settings: All in Nm
– Upper and lower wishbone pivot bolts 45
– Upper and lower swivel joint ball pins 55
– Upper swivel joint plinth to hub carrier 68 = Camber Bolts
– Toe-link outer ball joint to hub carrier 55
– Toe-link inner ball joint/wishbone to subframe 50
– Toe-link ball joint lock nuts 45
– Damper to lower wishbone 45
– Damper to chassis 45
– Brake caliper to hub carrier – upper M10 45 – 50
– lower M8 26 – 30
– Hub bearing unit to hub carrier 90
– Rear hub nut 220
– Wheel to hub 105 (78 lb-ft)


P-38’s in Chino at Planes of Fame – Honey Bunny, Glacier Girl, and three others…

P-38 Honey Bunny in Chino at Planes of Fame

Last week  5 of the 7 still flying P-38s flew from Chino to the Sacramento Capital airshow at Mather for the weekend show.   John Maloney flew chase in a P-51!

The fighters joined up over Lake Mathews for a photo shoot and then climbed up and headed north to Mather.  Along the way Hinton decided they would buzz Shafter where his son was preparing “Stega” for the Reno Races.  The WWII  fighters went screaming by the hangar all in a row at about 300 MPH!   The Air Museums P-38  23 Skidoo cracked a head so they followed her to descent at FAT and then pressed on.   At one point in the flight Maloney came from behind in the Mustang and dove down the right of the formation and pulled up into a giant exaggerated barrel roll around the rather loose goose formation so the camera man could snap a photo thru the canopy of the Mustang as he was inverted over the P-38 flight.  Sounds like fun!

Other P-38’s that made it to Mather included Ruff Stuff, Thoughts of Midnight, and Tangerine.


Bell P-39N Airacobra – Little Sir Echo – Small Fry

Bell P-39 Airacobra - Little Sir Echo

This is P-39N-5 “Little Sir Echo / Small Fry” Serial Number 42-19027 which served with the USAAF 5th Air Force (AF), 71st Tactical Reconnaissance Group (TRG), 82nd Tactical Reconnaissance Squadron (TRS), from June 1943 to July 16, 1944. It was abandoned at Tadji, Papua New Guinea, a Japanese airfield that was liberated by the US Army on April 26, 1944. Tadji became a major Allied air depot for American and Australian forces, and the resting place for this P-39 for the next thirty years. It is now on static display at the Planes of Fame Museum in Chino, CA.

This specific P-39 was delivered to the US Army on April 28, 1943, and sent to the Pacific in May. Lyndall W. Tate was assigned to this aircraft. Lyndall was born Oct 20, 1920 in Texas, and passed away Sept 15, 2008. He served over 28 years in the military. If anyone else has any further information on Lyndall, please let us know more about this hero. The aircraft was recovered from Tadji in a 1974 salvage operation funded by David Talichet’s Yesterday’s Air Force (MARC). It currently is on static display at the Planes of Fame museum. It still supports its original markings of Olive Drab over Neutral Grey with White New Guinea theatre markings on tail unit, wing leading edges and spinner (thin White band on nose). In addition it features an interesting shark mouth on the center drop-tank.

The Bell P-39 was one of the US’s main-line fighters when war first broke out in the Pacific at the beginning of World War II. It was unique at the time for having a tricycle undercarriage and a mid-mounted engine located behind the pilot. This arrangement was due to the proposed installation of a powerful 30 mm cannon in the nose. Ultimately, the P-39 was unable to achieve the same performance of later US and European fighters, mainly due to a lack of a turbo-supercharged engine which greatly limited the P-39’s ceiling and speed. However, its low-altitude performance, mid-mounted engine, and armor plating allowed it to become a great ground-support aircraft, most notably used by the Soviet Air Force. In the end, the Bell P-39 became Bell’s most successful fixed-wing aircraft that they ever produced.


MySQL – Help, I lost the Root password! Error number 1045

girl in red using laptop

Have you ever seen the dreaded MySQL Error number 1045 Access denied for user ‘root’@’localhost’ (using password: YES)?

Don’t worry, this is an easy to recover from situation. Just follow these basic steps to reset the root user password.

Stop the MySQL server process.

Start the MySQL server process with the –skip-grant-tables option. This option causes the server to start without using the privilege system at all, which gives anyone with access to the server unrestricted access to all databases. BEWARE! Anyone can access your server, so make sure off the Internet, and that you perform the following steps as quickly as possible.

Start the MySQL console client with the -u root option. Mysql -u root

SELECT * FROM mysql.user;

UPDATE mysql.user SET Password=PASSWORD(‘[password]’) WHERE User='[username]’; Replace [username] with root to change root. You can also change any other user as well.

Stop the MySQL process

Start the MySQL Process normally (i.e. without the –skip-grant-tables option).

Some folks have reported that issuing a Flush Privileges command will prevent your having to perform the final Stop/Start of the MySQL server. However, this has not always worked for me, and I think to be safe, it is wise to recycle the server.