Copy an existing MySQL table to a new table

This is a great set of two commands that allow the creation and population of a new table with the structure and data of an existing table. This provides a quick means of making a point-in-time copy of a table and is a safe, easy way to make a quick copy of a table for testing an application in development on live data without risking a production environment.

To make a copy of the table mytable which is in a different database called production into a new table called mytable_new in the currently selected database, use these two commands:

CREATE TABLE mytable_new LIKE production.mytable;
INSERT mytable_new SELECT * FROM production.mytable;

The first command creates the new table mytable_new by duplicating the structure of the existing table. The second command copies the data from old to new.

The nomenclature production.mytable is a means of specifying the database and table in the same way that a file can be specified by its directory path. It is optional. If production was left off, MySQL would assume that the mytable table was also in the currently selected database.

Access Denied error in windows vista

When you try to access some windows folder like document and setting you may get error message that “access denied”. you need to change ownership of this folder. So open properties by right click on it. In security button select advance tab and click edit button. Now change ownership to your account by highlighting your account and also select replace ownership to sub containers and apply changes.

Disable screensaver UBUNTU

Solution 1:

Edit /etc/X11/xorg.conf file using the following command

sudo vi /etc/X11/xorg.conf

and add the following lines

Section “ServerFlags”
#other options can go here
Option “BlankTime” “0″
Option “StandbyTime” “0″
Option “SuspendTime” “0″
Option “OffTime” “0″
EndSection

Save and exit the file

Solution 2

Edit /etc/X11/xorg.conf file using the following command

sudo vi /etc/X11/xorg.conf

This effectively disables power management on your monitor Settings

Section “Monitor”
#other options can go here
Option “DPMS” “false”
EndSection

Save and exit the file and restart your machine

 

Solution 3

gconftool-2  –set «/apps/gnome-screensaver/idle_activation_enabled» –type boolean false

 

Solution 4

gnome-screensaver-command –inhibit


Solution 5

gnome-screensaver-comand –poke

 

One of all the above should work in your UBUNTU (I hope…)