General PC Problem

...now browsing by category

 

Mysql Database repaired after Windows 8.1 upgrade

Friday, December 20th, 2013

Another disaster came with the Windows 8.1 upgrade over weekend  was discovered Monday morning when I was in desperate need for my local WordPress blog where I kept tons of valuable info for the project I have been working on. I clicked on the blog link and got an “Error establishing a database connection” message. Using that error message to search Google and returned many complaints about the same problem and basically it was that the upgrade has somehow disabled the underneath MySQL database.  Below were the steps I took to fix the problem and got my WP blog back online:

  1. Launched MySql installer and first selected Add/Modify Products and Features:

    Started MySql Installer to remove and reinstall MySql database engine

    Started MySql Installer to remove and reinstall MySql database engine

  2. First applied all the updates:
    MysqlInstaller_3
  3. After product updates were completed, trying to connect to 127.0.0.1: 3306 and still got the database not connected error; so decided that un-installing and re-installing MySql Database engine was the only option.
    MySql DB Uninstall
  4. When asked if to clean the existing data, did not check the “Remove server datafiles” option or I would lost all my old blogs!
    MySql DB Uninstall - 2
  5. After uninstalled, relaunched the MySql Installer and re-installed the MySql 5.6 Community Edition (default):
    MySql DB re-install
  6. After installation, just followed the configuration process through and added the same user account back (find user account info in wp-config.php); started the MySql Workbench and made sure it could connect to local host instance.
  7. Then that’s it! I browsed to the same work blog site and everywhere was sunshine again!

Downgraded Windows 8 to Windows 7, be careful

Thursday, December 27th, 2012

Recently I purchased a Lenovo ThinkPad T430 loaded with Windows 8 64 bit. A few days later I tried to downgrade Win8 to Win7 in order to be consistent with my company’s standard which is currently Windows 7; I thought it would be easy – just pop in the Windows 7 CD and let it delete the old partition and create a new NTFS partition, then install the Windows 7 32-bit. Well, yes, it did delete the partition where Win8 was installed. But I was unable to reformat it to NTFS that is required to install Windows 7. Windows 8 is only installed on GPT (Guid Paritition Table) format; at that point, I was basically in a limbo – I could not go back to Windows 8 because the GPT partition was deleted and was unable to install Windows 7 because it requires NTFS. Eventually, I got someone from Lenovo Community Forums to point me to using a DOS utility called DISKPART. With that, I have successfully overcome the biggest hurdle – re-partition my disk to NTFS format. Here I recorded the steps I just went through ( I also posted these to Lenovo Community Forums), hoping it will be useful to someone who might want to do the same:

  1. Powered up T430 and let the Diagnostic tool run “Preparing Automatic Repair”
  2. On screen showing “Diagnose your PC” then “Attempt to repair your PC”
  3. Automatic Repair failed, then two options button showed “Shutdown” and “Advanced options”; selected the “Advanced options” button
  4. Selected “Troubleshoot”, then “Advanced Options”
  5. Clicked on “Command Prompt” on Advanced Options screen
  6. Now we are in command prompt: c:\>; typed “diskpart /?” to list a possible commands
  7. Followed the instruction on http://www.computerhope.com/diskpart.htm to get the proper command switch
  8. At C:\> typed “diskpart” to enter DISKPART command mode; then type ? to list all the switches, such as GPT, Help, etc
  9. Diskpart>format fs=NTFS Label=”86DB-AC90″
  10. Did not format; message returned
    There is no volume selected.
    Please select a volume and try again
  11. As matter of fact, the problem was that I had not selected a disk; after reading this post at http://www.jwgoerlich.us/blogengine/post/2009/11/05/Use- Diskpart-to-Create-and-Format-Partitions.aspx, I did a “list disk” command at DISKPART>, and that got me a list of disk online.
  12. Then I did a select disk command: DISKPART>select Disk 0; it returned message “Disk 0 is now the selected disk”
  13. I ran “clean” command again; this time, message returned, “DiskPart succeeded in cleaning the disk”
  14. Diskpart>format fs=NTFS quick; still got the “There is no volume selected”
  15. Tried DISKPART>convert mbr
    DiskPart successfully converted the selected disk to MBR format
  16. DISKPART>create partition primary
    output: DiskPart succeeded in creating the specific partition
  17. DISKPART>select part 1
    output: Partition 1 is now the selected partition
  18. DISKPART>format fs=NTFS label=YangT430 quick
  19. Put in Windows 7 32-bit CD and installation now just sailed through.