Renaming a Database in Mysql

From the easy way to the crazy way here is how to rename a Mysql Database.

1. Using phpMyAdmin
Log into your phpMyadmin select the database that you want to rename and click on the Operations tab

2.   You can use mysqldump (This is the one I use or very large databases)

mysqldump -u username -p -v SourceDB > SourceDB.sql
mysqladmin -u username -p create  NewDB
mysql -u username -p NewDB < SourceDB.sql

3.  Create a new database and migrate all the tables from the old one to the new one.

4.  The Crazy Option

Shutdown the MYSQL Database
Locate the location where MYSQL save the databases. (ususally they are located in /var/lib/mysql/ on a Linux platfrom)
Rename All Old database Files to new Database filenames (something like mv olddb.* to Nename.*)
Restart The Database
Make sure you check the Grant permission.

Remove White Space and Special Characters in your T-SQL strings

Handling White space in T-sql is very annoying. When you are comparing strings it is crucial that you remove any white space or special characters that could interfere with your results.  You can user rtrim(ltrim () but the problem is rtrim(ltrim () does not catch special characters such as  Hexadecimal X09.

Since we are not able to see the whitespaces it creates a challenge when we  implement our queries so please use this t-sql to create a function or a stored procedure to remove any whitespace and special characters from your T-SQL strings.

select
ltrim(rtrim(
REPLACE(REPLACE(REPLACE(REPLACE(
REPLACE(REPLACE(REPLACE(REPLACE(
REPLACE(REPLACE(REPLACE(REPLACE(
REPLACE(REPLACE(REPLACE(REPLACE(
REPLACE(REPLACE(REPLACE(REPLACE(
REPLACE(REPLACE(REPLACE(REPLACE(
REPLACE(REPLACE(REPLACE(REPLACE(
REPLACE(REPLACE(REPLACE(REPLACE(
' Enter The string you want to
sanitize here'
,char(1),'')	,char(2),'')	,char(3),'')	,char(4),'')
,char(5),'')	,char(6),'')	,char(7),'')	,char(8),'')
,char(9),'')    ,char(10),'')	,char(11),'')	,char(12),'')
,char(13),'')	,char(14),'')   ,char(15),'')	,char(16),'')
,char(17),'')	,char(18),'')	,char(18),'')   ,char(20),'')
,char(21),'')	,char(22),'')	,char(23),'')	,char(24),'')
,char(25),'')	,char(26),'')	,char(27),'')	,char(28),'')
,char(29),'')   ,char(30),'')	,char(32),'')   ,char(32),'')
))

Char () T-sql
http://msdn.microsoft.com/en-us/library/ms187323.aspx



Insert CheckBoxes In Microsoft Word

This article is just a quick reference not a duplication of Microsoft’s work. For more details about checkboxes please visit :
(http://office.microsoft.com/en-us/word-help/make-a-checklist-in-word-HA001162451.aspx)

"On the View menu, point to Toolbars, and  then click Forms. On the Forms toolbar, click Check Box Form Field
 Button imageNote  If the  check box has a gray background, click Form Field Shading
 Button imageon the  Forms toolbar to remove the gray shading.

Click the next cell where you want to insert a check box, and then press  CTRL+Y to insert another check box.

After you insert a check box for each item that you want, click the top  right cell and type the text for the first item. Repeat this step for each item  in the list."

Microsoft.com (http://office.microsoft.com/en-us/word-help/make-a-checklist-in-word-HA001162451.aspx)

Change VirtualBox Boot Order

Changing the boot order in VirtualBox (3.2.8…) is not hard but if you expect to log into the BIOS to change it  GOOD luck!.

It is because only two ways  to change the boot order are the followings:

Via the VirtualBox Interface (you can also manually change the config file).


or by Hitting F12 on Boot

you will access a screen that looks like this