Restore mysql database on windows
mysql -u root -p dbanme < db.sql
Discover and enjoy a wide range of IT solutions designed to make your digital experience smoother, faster, and more efficient. From software tips to troubleshooting guides, find everything you need in a place. Stay updated, stay secure, and enhance your tech skills with reliable, user-friendly information and resources.
SET @dt = '2012-07-01'; -- Last day of the previous month (June 2012) was a Saturday
SELECT CASE DAYOFWEEK(LAST_DAY(@dt-INTERVAL 1 MONTH))
WHEN 1 THEN LAST_DAY(@dt-INTERVAL 1 MONTH)-INTERVAL 2 DAY
WHEN 7 THEN LAST_DAY(@dt-INTERVAL 1 MONTH)-INTERVAL 1 DAY
ELSE LAST_DAY(@dt-INTERVAL 1 MONTH)
END x;