Posted on Leave a comment

This installation of MySQL is already upgraded to 5.7.29, use –force if you still need to run mysql_upgrade E: dpkg was interrupted, you must manually run ‘dpkg –configure -a’ to correct the problem.

This installation of MySQL is already upgraded to 5.7.29, use –force if you still need to run mysql_upgrade E: dpkg was interrupted, you must manually run ‘dpkg –configure -a’ to correct the problem.

The solution is:

1- Open this file for edit:
/var/lib/dpkg/info/mysql-server-5.7.postinst

2- At line # 370, comment the echo ALTER statement which would like  
#echo “ALTER USER ‘root’@’localhost’ IDENTIFIED WITH ‘auth_socket’;” >> “$initfile”
(just add # to the beginning of this line to convert it to comment)

3- Save above file and start updating it will be fine

Posted on Leave a comment

Site Migration Risks (URL Change)

https://support.google.com/webmasters/answer/34437
https://support.google.com/webmasters/topic/6033102?hl=en&ref_topic=6029673
https://support.google.com/webmasters/answer/6033049?hl=en&ref_topic=6033084&visit_id=637156175388140145-3776646314&rd=1
https://www.searchviu.com/en/website-relaunch-seo-checklist/#awareness
https://searchengineland.com/site-migration-seo-checklist-dont-lose-traffic-286880
https://www.geekytech.co.uk/website-migration-redesign-seo-checklist/
https://www.searchenginejournal.com/changing-url-structure/325249/#close
https://moz.com/community/q/will-changing-a-url-negatively-affect-ranking
https://moz.com/blog/should-i-change-my-urls-for-seo

Posted on Leave a comment

Enable inheritance for Bulk Ad User (Active Directory)

Run below script to enable inheritance for Bulk AD user under specific OU (enable inheritance on all AD user accounts)

$ADusers = Get-ADUser -ldapfilter "(objectclass=user)" -searchbase "OU=Students,DC=ukh,DC=edu,DC=krd"
ForEach($user in $ADusers)
{
    # Binding the users to DS
    $ou = [ADSI]("LDAP://" + $user)
    $sec = $ou.psbase.objectSecurity
 
    if ($sec.get_AreAccessRulesProtected())
    {
        $isProtected = $false ## allows inheritance
        $preserveInheritance = $true ## preserver inhreited rules
        $sec.SetAccessRuleProtection($isProtected, $preserveInheritance)
        $ou.psbase.commitchanges()
        Write-Host "$user is now inherting permissions";
    }
    else
    {
        Write-Host "$User Inheritable Permission already set"
    }
}
Posted on Leave a comment

The action ‘Set-DistributionGroup’, ‘HiddenFromAddressListsEnabled’, can’t be performed on the object ‘Office of Vice Chancellor – Group’ because the object is being synchronized from your on-premises organization. This action should be performed on the object in your on-premises organization.

Error

The action ‘Set-DistributionGroup’, ‘HiddenFromAddressListsEnabled’, can’t be performed on the object ‘Office of Vice Chancellor – Group’ because the object is being synchronized from your on-premises organization. This action should be performed on the object in your on-premises organization.

When trying to edit (Hide this group from address lists) property using office365 exchange.

You can solve this error two ways:

 

  • Using Power Shell Command line
    Set-DistributionGroup -Identity "GroupName" -HiddenFromAddressListsEnabled $true
  • Changing msExchangeHideFromAddressList attribute in Active Directory Group
    msExchHideFromAddressLists

 

Posted on Leave a comment

Show battery percentage icon in Windows 10 Taskbar

IF battery icon missing in the taskbar notification area then follow below steps:

  1. Click on Start menu and then settings
    Windows 10 Start Menu
  2. Settings window will appear, then type (Turn System icons on or off) in the search box and click on it
    Turn System icons on or off
  3. Once the window of “Turn System icons on or off” opened, click on the checkbox to turn on any system icon to appear in the taskbar
    Show Power icon Windows 10
Posted on Leave a comment

Automatically Backup MySQL Databases on Windows

MySQL Command for backup all databases:

mysqldump -uUSERNAME -pPASSWORD –all-databases > “D:/File_NAME_%date:~-4,4%-%date:~-10,2%-%date:~-7,2%-%time:~0,2%_%time:~3,2%_%time:~6,2%.sql”

Example:

Consider MySQL username = root and password = 123456

mysqldump -uroot -p123456 –all-databases > “D:/mysql_backup_%date:~-4,4%-%date:~-10,2%-%date:~-7,2%-%time:~0,2%_%time:~3,2%_%time:~6,2%.sql”

The result will be a file name (mysql_backup_2017-10-21-20_29_54.sql) containing all databases.

MySQL Command for one database databases:

mysqldump -uroot -p123456 –databases mydatabasename > “D:/mysql_backup_%date:~-4,4%-%date:~-10,2%-%date:~-7,2%-%time:~0,2%_%time:~3,2%_%time:~6,2%.sql”

We replaced –all-databases with –databases databasename

Note the date format:

  • %date:~-4,4%: year 4 digits
  • %date:~-10,2%: month 2 digits
  • %date:~-7,2%: day 2 digits
  • %time:~0,2%: time in 24 hours format
  • %time:~3,2%: minutes 2 digits
  • %time:~6,2%: seconds 2 digits

Now, after you customized the file name and date format, save your last command in file with (.bat) extension for examle:

mysqk-backup.bat

And put the file in local C: drive inside windows or any where in safe place of which normal user will not delete it, and then

  1. Press windows key + R to open Run windows and then type taskschd.msc
    Windows Run
  2. Once the Task Scheduler opened, Create New Task (located at the right sidebar) or go to Action menu and then Create Task
    Task Scheduler
  3. The task creation menu will open, first in General Tab, Fill name of the task (MySQL Database Backup – Daily)
    Task Scheduler General Tab
  4. Then Click on Triggers tab and Then New.. to create new trigger (This is where you set your schedule plan)
    Task Scheduler Trigger
  5. Then Click Ok, and now go to Actions tab
    Task Scheduler New Action
  6. Then Click on New.. once the window opened, browser to your file that we mentioned above, in our example we used (mysqk-backup.bat)
    Task Scheduler New Action
  7. Then click ok!, and again Click Ok to save everything.
  8. You can now right click on this task and click run to test if everything works fine.