TUTORIAL: Export database phpMyAdmin – Export database MySQL

Is it phpMyAdmin or mySQL?
The difference between these two is that mySQL is a  database server with command tools and phpMyAdmin is the webapplication for mySQL.

So in short they’re the same.

I’ve made 2 short guides to export and import a database in mySQL / phpMyAdmin.
And 2 long guides for the same thing, but step by step with screenshots. Scoll down to the appropriate guide.

Short guide – Export database phpMyAdmin / mySQL

  1. Open your cPanel
  2. Find the phpMyAdmin button
  3. Select the database you would like to export
  4. Click Export
  5. Select Quick as Export method.
  6. View the Settings
  7. Select the appropriate format
  8. Click Go

The selected database will be exported and downloaded.

Short guide – Import Database phpMyAdmin / mySQL

  1. Open your cPanel
  2. Find the phpMyAdmin button
  3. Browse to the Import file
  4. View the Settings
  5. Select the appropriate format
  6. Click Go

The selected database will be imported.

Long guide – Export database mySQL / phpMyAdmin

  1. Go to your webhosting login page
  2. Open your cPanel
  3. Find the phpMyAdmin button.
  4. Open phpMyAdmin. See the screenshot:
Export database mysql | Export database phpmyadmin
Export database mySQL | Export database phpMyAdmin
  1. Select the appropriate Database
  2. Click on Export
Export database mySQL - Export database phpMyAdmin
Export database mySQL – Export database phpMyAdmin
  1. Select Quick if you don’t know what you’re doing
  2. Choose the appropriate format, again: if you don’t know what you’re doing select SQL
  3. Click Go to export the Database.
Export database mySQL - Export database phpMyAdmin
Export database mySQL – Export database phpMyAdmin

Exporting a database is easy, but importing a database is just as easy or maybe even easier.

Long guide – Import database mySQL / phpMyAdmin

  1. Go to your webhosting login page
  2. Open your cPanel
  3. Find the phpMyAdmin button.
  4. Open phpMyAdmin. See the screenshot:
Import database mysql | Import database phpmyadmin
Import database mySQL | Import database phpMyAdmin
  1. Click the Import button
  2. Browse to the appropriate file
  3. Select utf-8
  4. Don’t uncheck the Partial Import
  5. Select the appropriate format: default is SQL
  6. Click Go
Import database in mysql with phpMyAdmin webGUI
Import database in mysql with phpMyAdmin webGUI

That’s it. If you need more help please comment below.
This is a refurbished post. The old post is re-directed to this one.

TUTORIAL: Sync server time NTP

The time on the Source Server must be within 5 minutes of the time on the Destination Server, and the date and time zone must be the same on both servers. If the Source Server is running in a virtual machine, the date, time, and time zone on the host server must match that of the Source Server and the Destination Server. To help ensure that Windows SBS 2008 is installed successfully, you must synchronize the Source Server time to the Network Time Protocol (NTP) server on the Internet.


Short version: Sync server time NTP

  1. Open Command Prompt as Aministrator
  2. Run: w32tm /config /manualpeerlist:YOURSERVERNAME /syncfromflags:manual /reliable:yes /update
  3. Run: Net stop w32time
  4. Run: Net start w32time
  5. You’re finished.
set server time ntp
Set server time ntp

Longer version: Sync server time NTP

  1. Go to start.
  2. search for Command Prompt
  3. Right click Command Prompt
  4. Run as administrator
sync server ntp
Sync server ntp

TIP: We cannot change the Sync server time NTP without running Command Prompt (CMD) as Administrator.

Active Directory can’t work correctly (or at all) if the clock is not synchronized around domain controllers/member machines. Computers that are more than 5 minutes out of sync will not authenticate which is configurable by GPO.

We can use the Windows Time Service for clock synchronization: W32Time.

Run the following command in Command Prompt.

w32tm /config /manualpeerlist:YOURSERVERNAME /syncfromflags:manual /reliable:yes /update

What is “YOURSERVERNAME? Your server name is the NTP server aka PDC Emulator FSMO Role.

set server time ntp
Set server time ntp

If you get the following error: “The following error occurred: The service has not been started. (0x80070426)” then please continue.

If you see “The command completed successfully.” scroll to the next step.

As the error states your W32tm service is not running. Run “net start w32time” in CMD:

The following error occurred: The service has not been started. (0x80070426)
Net start w32time – The following error occurred: The service has not been started. (0x80070426)

Congrats! the server NTP time is correct now, but we’re not done yet.

We still have to go through two small steps. We need to re-start the service before the time is synchronized.  In the next step we’ll stop the service and then re-start the service.

  1. Type net stop w32time
  2. Type in Net start w32time
    See the gif below:
set server time ntp
Set server time ntp

We’re truly finished now. May there be something please comment below!

This is my very first refurbished blog post. My old one named “TUTORIAL: Synchronize server with NTP server” has a 301 re-direct to the new one.

FIX: enable network adapter Azure VM

In my azure portal I created a few Virtual Machines and I wanted to turn one of these in a DNS server. Unfortunately I had never tried this in Azure, and I couldn’t get it to work due to the Network Security Group and Network Interface in Azure..

After adding a static IP address in Azure and internal it still didn’t worked. So I came up with the bright idea to just disable the network adapter in the VM and re-enable it after a few seconds to see if this would work.

Well what do you know? Sigh… disabling the Network Adapter of a Virtual Machine in Azure makes it lose it’s internet… I don’t know what I was thinking, but I accidentally disabled the network adapter

  • I tried re-starting the Virtual Machine with the hope I would be able to connect again, but no that didn’t work.
  • There is a Redeploy button in azure. I tried.. but no.enable network adapter Azure VM
  • I knew from the old interface manage.windowsazure.com that you could change the VM size and it would remove conflicts and work correctly again. I had all my hopes on this.. but also.. NO! It didn’t work! See reference here.

After all this I made a post on https://reddit.com/r/AZURE.

They gave me the fix:
Enable the network adapter by creating a new Network interface in Azure. Then attach it to your Virtual Machine with Powershell.

Lets start by creating a new Network Interface. Log on portal.azure.com and search for Network Interface.

disabled network azure vm
Disabled network azure vm

Add a new Network Interface

disabled network azure vm
Add new network interface

Fill in the required information. Make sure you choose the right virtual network. Should be the same the virtual machine is on.

Now we’ve created a new NSG, we’ll have to attach the old Network Security group or create a new one.

Below is the tutorial for a new Network Security Group, if you already have one please scroll down.

Log on portal.azure.com and search for Network Security Groups

network adapter azure
Network adapter azure

Click on Addenable network adapter Azure VMNow create a new Network Security Group (NSG)

enable network adapter Azure VM
Enable network adapter Azure VM

Now we’ve created a NSG we can attach it to the Network Interface.
Search for Network interfaces:

disabled network azure vm
disabled network azure vm

I choose a random network interface, because I didn’t create one in the first time.

  1. Click the Network interface
  2. Click Network Security Group
  3. Now click edit
enable network adapter virtual machine
enable network adapter virtual machine
  1. Click the NSG
  2. Select the NSG you’ve created
  3. Click save
network adapter vm
network adapter vm

okay, we have a network interface and a network security group. The new network security group now hangs on the network security group. Now, we must attach the VM to the new network interface through PowerShell

To use PowerShell with azure we need to install the Azure modules. You could install the PowerShell Gallery, or install it in a elevated PowerShell.  The link is listed below is for the PowerShell Gallery and should you install yourself further. 

Link to the powershell Gallery

Install the Azure module using the below commands in an elevated PowerShell prompt:

  # Install the Azure Resource Manager modules from the PowerShell Gallery
  Install-Module AzureRM

  # Install the Azure Service Management module from the PowerShell Gallery
  Install-Module Azure

Now comes the tricky part. We’re going to use a PowerShell script to attach your VM to your new Network interface:

Open PowerShell and use the following commands:

Login with your azure account

Login-azurermaccount

See what you subscriptions are:

Get-azurermsubscription

Select your default subscription:

Select-azurermsubscription -subscriptionanme "SUBSCRIPTIONNAME"

Now comes the true tricky part:
We’ll have a use a long PowerShell script.

Copy/paste the below script in your PowerShell.
We’ll need to gather some information before we can run it.

Resource_group_nameGet the RSG your VM is in
Virtual_machine_nameVirtual Machine name
Network_interface_nameNetwork Interface name
Subscription_ID_Network_interfaceSubscription ID something like this: 81bdb7e0-2010-4c36-ba35-71c560e3b317
See screenshot below script.
New_Network_interface_Subscription_IDSame as above, something like this: 81bdb7e0-2010-4c36-ba35-71c560e3b317
New_network_interface_nameNew network interface name

 

Param(
 [parameter(Mandatory=$True)][string]$resource_group_name,
 [parameter(Mandatory=$True)][string]$Virtual_machine_name,
 [parameter(Mandatory=$True)][string]$network_interface_name,
 [parameter(Mandatory=$True)][string]$subscription_ID_Network_interface,
 [parameter(Mandatory=$True)][string]$New_Network_interface_subscription_ID,
 [parameter(Mandatory=$True)][string]$New_network_interface_name
)
$New_Network_interface_subscription_ID = "$New_Network_interface_subscription_ID"
$resource_group_name = "$resource_group_name"
$Virtual_machine_name = "$Virtual_machine_name"
$subscription_ID_NI = "$subscription_ID_Network_interface"
$id = "/" + "subscriptions" + "/" + $subscription_ID_Network_interface + "/" + "resourceGroups" + "/" + $resource_group_name + "/" + "providers/Microsoft.Network/networkInterfaces/" + $network_interface_name
$id2 = "/" + "subscriptions" + "/" + $New_Network_interface_subscription_ID + "/" + "resourceGroups" + "/" + $resource_group_name + "/" + "/providers/Microsoft.Network/networkInterfaces/" + $New_network_interface_name

$VirtualMachine = Get-AzureRmVM -ResourceGroupName $resource_group_name -Name $Virtual_machine_name Remove-AzureRmVMNetworkInterface -VM $VirtualMachine -id $id Update-AzureRmVM -ResourceGroupName $resource_group_name -VM $VirtualMachine Add-AzureRmVMNetworkInterface -VM $VirtualMachine -Id $id2 Update-AzureRmVM -ResourceGroupName $resource_group_name -VM $VirtualMachine
network adapter vm
network adapter vm

We could say we’re finished, but there are 2 last things we’ll have to do to make sure everything works as before.

If you’ve created a new Network Security Group we’ll have to add a port so you can make a Remote Desktop Connection to your VM.

  • Open Network Security Groups
  • Click on your freshly made NSG
  • go go Inbound Security rules
  • Click Add
network adapter vm
network adapter vm
  • Name it default-RDP
  • Source: Any
  • Select service RDP
  • There rest will be filled in automatically.
  • Click OK
network adapter vm
network adapter vm

Last but not least, to make a connection to your  VM it will need an IP address, so go to your Network Interface and connect your old IP address.

network adapter vm

And that should do the trick! we’re finished it’s over!

FIX: Razer mouse randomly freezes

Since a few days my Razer mouse kept hanging when I lift it off my mouse-mat. Having a Razer mouse randomly freezes while gaming it f*cking sucks.. I searched for a solution on Google and found one at steam. I’ve only perfect-ionized his tutorial so all credits go to Steam user bladesmc.

I’ve created a tutorial with screenshots.

FIX: Razer mouse randomly freezes

Find the Razer Synapse app in start.

razer mouse freeze
razer mouse freeze

Lets first go to performance

Razer mouse randomly freezes
Razer mouse randomly freezes

Set the Polling rate to 500. This should be the default, but lets check if it’s on 500.

Now let’s go to Calibration

Razer mouse hanging
Razer mouse hanging
  1. Make sure surface calibration is enabled
  2. If you have a Razer mat choose the first option, if you have a different mat please choose option 2. Now follow the steps that are on your screen.
  3. This might also be a good one to know for future problems: “If you’re experiencing tracking issues, please manually reset your mouse by holding the left, right and scroll wheel mouse buttons for 5 seconds.
what is razer synapse 2.0?

Directly from their website:

‘Razer Synapse is our unified configuration software that allows you to rebind controls or assign macros to any of your Razer peripherals and saves all your settings automatically to the cloud. No more tedious device configurations when you arrive at LAN parties or tourneys, as you can pull them from the cloud, and get owning right away.’

FIX: Sorry we were unable to save your configuration Adsense WordPress

Have you installed the Google Publisher plugin for WordPress?

From their plugin page: “This plugin lets you place AdSense ads using a simple point-and-click UI rather than manually inserting snippets yourself. To insert AdSense ads without the plugin would first involve generating the AdSense snippet and then pasting the Adsense snippet into either the text of the site or directly into the PHP. Google automatically determines potential placements for AdSense ads, suggests an initial ad layout, and allows you to lay out ads on your site.”

Sounds great, except for when it gives you the following error code:

Unable to apply changes to your site. Sorry we were unable to save your configuration. The request to your server failed with error code 500.

Activating Google Ads in the Google Publisher plugin for WordPress will show the below image

Unable to apply changes to your site. Sorry we were unable to save your configuration. The request to your server failed with error code 500
Unable to apply changes to your site.
Sorry we were unable to save your configuration. The request to your server failed with error code 500

After that screen, you get the following screen

Unable to apply changes to your site. Sorry we were unable to save your configuration. The request to your server failed with error code 500
Unable to apply changes to your site.
Sorry we were unable to save your configuration. The request to your server failed with error code 500

Unable to apply changes to your site. Sorry we were unable to save your configuration. The request to your server failed with error code 500

have you installed the WordPress plugin WordFence? De-activate the plugin and try again to enable ads on your website.

It’s the Web Application Firewall feature that will prevent you from enabling ads. The Web Application Firewall stops you from getting hacked by identifying malicious traffic, blocking attackers before they can access your website. Powered by the Threat Defense Feed, it is automatically updated with new firewall rules that protect you from the latest threats. Even if you are running a vulnerable plugin or theme, Wordfence will protect you from being hacked by blocking attacks based on known and constantly updated attack patterns.

Please contact me if this is not the issue.

FIX: Mail notification Identity synchronization Error Report

After configuring Azure Active Directory connect it will send you e-mails with Identity synchronization Error Reports. The reports show which active directory objects have sync errors. The Identity synchronization Error Report can be useful, but if you get one every 30 minutes I consider it as SPAM.

You cannot disable Identity synchronization Error Report e-mails. In the tutorial I’ll show where you can change your email address. Change the e-mail address to something legit for when you do need the reports.

Although most error report and notification are sent to the Global Administrators, the AADconnect Identity synchronization Error Report will only be delivered to the Technical Contact email address.

Mail notification Identity synchronization
Mail notification Identity synchronization

Log on office 365 management portal and open the admin center.

Create email blacklist Office 365Click on your company name in the right-upper-corner.

Identity synchronization Error Report
Identity synchronization Error Report

Here you’ll see your company information. Click on edit.

Identity synchronization Error Report
Identity synchronization Error Report

Update the technical contact e-mail address and click Save.

Identity synchronization Error Report
Identity synchronization Error Report

From windowstricks.in

DirSync to sync your local on-premises Active Directory with cloud based services. dirsync is the easiest option to implement however it comes with less flexibility what you can change in the configuration and It doesn’t support multi-forest environments.

Azure AD Sync is advance version of DirSync, it support most of the functions of traditional DirSync, and adds extra functionality such as mutli-forest support and password write back. I recommend to use the Azure AD Sync tool because it’s more flexible then Dir Sync

Azure AD Connect is currently in Preview stage. It has many of the same features as DirSync and Azure AD Sync, its going to replace DirSync and Azure AD Sync and it has plans for many other features such as non-AD LDAP support.

Azure Connect is recommended for larger organizations that have greater flexibility requirements, it provides consistent experience in hybrid environments that may or may not entirely utilize Microsoft on premise solutions

For more questions please comment below.

FIX: laptop goes to sleep while typing

I was having an issue for months now where my laptop goes to sleep while typing.

It was driving me crazy, but now I’ve found out why this was happening it actually made me laugh.

A few things I thought of what it could be:

  1. Outlook crashes?? And my laptop goes to sleep.
  2. I press a hotkey while typing.
  3. Windows 10 sucks?
  4. Dell laptops suck!?

I was able to use an USB keyboard without issues. At home I use a Razer keyboard and at work I could usually find an USB keyboard, but it was one of those Mondays again where everyone is at work and grumpy. I couldn’t find a keyboard so I my laptop went to sleep every 15 minutes…

I googled some, and probably the same as you: Laptop going to sleep while typing

I found an interesting article on the answers.microsoft.com page.

especially this post from GHCMillard:

“I’m a computer repair technician and suddenly one day I started having the same problem, 9-12-2011 in fact.  I tried everything, reloading the computer, flashing the bios, changing all settings to never sleep, and none of them worked.  I was still having the same problem with my computer going to sleep in the middle of my typing, all random of course, i could type a paragraph or only a letter, and suddenly wham it would go to sleep.  I was very frustrated, so I sat down for an hour and thought about anything that had happened that day to try and figure out what might have happend.  I didn’t want to think the worst (bad motherboard).  It took me a bit but it finally hit me.  I had bought this pretty new braclet that day, one of those magnetic ones that are supposed to help with arthritis and carpol tunnel syndrom. 

As a computer tech i felt very foolish because as any of us in the field will tell you computers + magnet = trouble.  I didn’t think anything of it when I bought it and had already forgotten I was wearing it.  Bingo, took it off about 10 minutes ago and I’ve been typing like a mad woman every since.  No problems what so ever.  Just thought I would throw this out there in case you might just be wearing said kind of braclet.”

My lovely girlfriend bought me one of those Josh bracelet for my birthday! Problem solved woehoe!! an I issue I’ve been having for over a year! No more typing and laptop going to sleep…

Bracelet for reference:

laptop goes to sleep while typing
laptop goes to sleep while typing

TUTORIAL: Add subdomain to compatibility view GPO

If you try adding a sub-domain (subdomain.baswijdenes.com) to the compatibility view in IE, you’ll receive an error and it will add the full domain Baswijdenes.com instead.

This is probably not what you want because the rest of the website works perfectly without compatibility view.

There is a way to add the subdomain only to the compatibility view. In this tutorial I’ll explain you how we can Add subdomain to compatibility view.

What is a subdomain? 

Subdomains are extensions of your domain name that you can forward to URLs or point to IP addresses and directories within your hosting account.

What is compatibility view?

Directly from the Microsoft website:

Websites that are designed for older versions of Windows Internet Explorer don’t always display as expected in the current version. We addressed this in Windows Internet Explorer 8 by adding the Compatibility View function that allows users to “revert” to a previous browser version.

Examples of incompatibility issues that are addressed by Compatibility View include incorrect browser or feature detection. Today many sites use browser detection instead of feature and behavior detection to give Internet Explorer (IE) markup that is not interoperable with modern web standards. This can result in major functionality breaks on sites when rendered in newer versions of IE.

Compatibility View allows content designed for older web browsers to render well in newer versions of Internet Explorer. The Compatibility View (CV) List automatically displays the content of websites in Compatibility View without further interaction.

Let’s add your subdomain to the compatiblity view.
  1. Click start
  2. Search for Edit group policy
  3. open Edit group policy
Add subdomain to compatibility view
Add subdomain to compatibility view

We’ll have to open a view folders to reach Use Poliy List of Internet Explorer 7 sites.

  1. open User configuration
  2. open Administrative templates
  3. open windows components
  4. Open Internet Explorer
  5. Open Compatibility View
  6. Find Use Policy List of Internet Explorer 7 sites and open it.
sub domain compatiblity view
sub domain compatiblity view
  1. Set it on Enabled
  2. Click on Show…

    sub-domain compatibility view
    sub-domain compatibility view

Now add your subdomain to the list. I’ve added subdomain.baswijdenes.com as an example.

add website to Compatibility View
add website to Compatibility View

Press ok & apply.

Your subdomain will not be added to the list of subdomains when added to a policy. 

The tutorial will only work on Microsoft Windows Pro or higher. 

TUTORIAL: disable shortcut home screen Android

As what have probably brought you here. When you install an application from the Google Play Store a shortcut is added to your Home screen. Is it Handy? I don’t know.. I’ll leave that up to you, but 9/10 times I do not want a shortcut on my start screen.


Tutorial: disable shortcut home screen Android

Lets follow the next steps to disable shortcut on the start screen.

  1. Go to apps
disable shortcut android
disable shortcut android

2. open Play Store

shortcut home screen android
shortcut home screen android

Click on the hamburger menu next to Google Play. See the image below:

shortcut android
shortcut android

4. Scroll down and open Settings

shortcut home screen Android
shortcut home screen android

Find “Add icon to Home screen” and uncheck the box.

disable home screen android
disable home screen android

The next time you’ll install an app it wont be added to your home screen. If you do want an app on your home screen open apps > hold the app and move it to the home screen.

The image below shows you how to add an app to your home screen.

disable shortcut android
disable shortcut android

Do you regret removing this option? Just check the box next to “Add icon to Home Screen

After you install an app from the Google Play store, an icon will appear on your home screen for you to easy access the app… but if you install quite a few apps you the apps will add up and eventually make your home screen full with apps you barely use.
With the steps I provided you can disable the shortcuts from automatically being placed on your home screen.

TUTORIAL: Add HTML to Android App

When you’re creating an Android App there is a high chance you’ll have to add html to android. For example a Help content or FAQ page. You can also use html in android, but you’ll have to add an assets folder in Android Studio (your project) before you can start using html in your Android Application.

In this tutorial I’ll show you how you add html to android app.

 


tutorial: Add HTML to Android App

Before we start; open your Android project in Android Studio. Or download Android Studio here.

  1. Right click on “app” in the upper left corner.
  2. Click New 
  3. Click Folder
  4. Click Assets Folder
assets folder android
assets folder android

Lets not change the Target Source Set unless you know what you’re doing.

  • Click Finish
html android studio
html android studio
  1. Right click Assets
  2. Click New
  3. Click File
add html to android app
add html to android app
  • Name your html file and add .html
add html android studio
add html android studio

Add your html content or copy your html file from your PC to Android Studio.

You can use the index.html file by adding the following code snippet to your MainActivity.java

WebView view = new WebView(this);
view.getSettings().setJavaScriptEnabled(true);
view.loadUrl("file:///android_asset/index.html");
setContentView(view);

For more Webview classes click here.