Wednesday, September 26, 2012

Remote ROOT access to MySQL

login to mysql

mysql -u username -p password

mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'passwd';

now exit from mysql and restart the service of mysql.

remote root for mysql,remote root access to mysql,mysql remote root

Saturday, September 22, 2012

Mysql Database Import/Export Command Line

Export mysql database

          mysql -u username -p database name > filename.sql


Import mysql database

          mysql -u username -p database name < filename.sql


Export all databases from remote server to local machine

          mysqldump -u username -p -h hostname --all-databases > filename.sql
import command for mysql,export command for mysql,import mysql,export mysql,mysql import,mysql export,command line import mysql database,command line export mysql database,mysql database export,mysql database import

Thursday, September 20, 2012

How to run C program in ubuntu

sudo apt-get install build-essential

now open gedit or any other text editor
type your program and save with .c extension.

if your program name is sample.c, type below command

gcc -o sample sample.c

it will create executable file with the name sample.

now, to run the program just type

./sample

it will run your program.
c program ubuntu,ubuntu c program,run c program in ubuntu,run c program

Tuesday, September 18, 2012

Share Ubuntu Printer with Windows

Install Samba and smbfs
          sudo apt-get install samba smbfs

after installation of samba and smbfs open smb.conf
          sudo gedit /etc/samba/smb.conf

find the section
########## Printing ##########


find below lines and do changes as below

# CUPS printing.  See also the cupsaddsmb(8) manpage in the
# cupsys-client package.
    printing = cups
    printcap name = cups

    security = share

after doing above changes now make changes in [printers] section with

          browsable = yes
          guest ok = yes

Save the file and restart the service of samba. Now, go to windows and find the printer.


share printer in ubuntu,share ubuntu printer with windows,share printer with windows,share printer in linux,linux printer sharing,ubuntu printer sharing

Friday, July 13, 2012

Scheduled Backup of Mails in Linux

Majority Linux Users are using Thunderbird Mail Client. now if they need to take auto scheduled back up of mails just need to write the below script and set a cron job for that.

#!/bin/sh
## Script to backup Thunderbird email
## Backup needs a date (stamp)

set -x
x=`date +%d%m%y.%H%M`

## Save space by making sure backup is archived
tar zcf thunderb-mail-${x}.tgz /home/user directory/.thunderbird

## Save the compressed backup to mybackup folder
cp thunderb-mail-${x}.tgz /path to store your backup

## Clean up after, we don't need two copies of the backup
sudo rm ~/thunderb-mail-${x}.tgz



schedule mail backup,mail backup in linux,schedule mail backup in linux,scheduled backup for thunderbird,scheduled backup thunderbird linux,linux scheduled backup in thunderbird

Auto Screenshot in Linux

copy and paste below code and save the file as any name you would like with the extension .sh

#!/bin/sh

import -window root -display :0 -crop 1024x768+25+25 \
   "/path to store screenshot/$(date +%m.%d.%y_at_%H.%M.%S).png"

now move this file in /bin directory and set the scheduled task using cron. if you are using ubuntu you can use scheduled task application also.


auto screenshot,linux auto screenshot,linux screenshot,screenshot script linux,screenshot script

Tuesday, July 3, 2012

Android device not detected in Eclipse in Ubuntu

Are you seeing ?????????? on eclipse when you plug your android device to eclipse on your Ubuntu machine.

Serial No : ???????????
AVD Name : N/A
Target : Unknown
State : ??

Follow this for Solution :

(1) sudo vi /etc/udev/rules.d/51-android.rules       
(2) SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
idVendor is company of your phone, choose the vendor id and paste it inplace of 0bb4

Company
Vendor ID
Acer
0502
Asus
0b05
Dell
413c
Foxconn
0489
Fujitsu
04c5
Fujitsu Toshiba
04c5
Garmin-Asus
091e
Google
18d1
Hisense
109b
HTC
0bb4
Huawei
12d1
K-Touch
24e3
KT Tech
2116
Kyocera
0482
Lenovo
17ef
LG
1004
Motorola
22b8
Nec
0409
Nook
2080
Nvidia
0955
OTGV
2257
Pantech
10a9
Pegatron
1d9d
Philips
0471
PMC-Sierra
04da
Qualcomm
05c6
SK Telesys
1f53
Samsung
04e8
Sharp
04dd
Sony
054c
Sony Ericsson
0fce
Teleepoch
2340
Toshiba
0930
ZTE
19d2


(3) sudo chmod a+r /etc/udev/rules.d/51-android.rules
(4) sudo service udev reload

and you're done.
device not detectd,andorid not detected,android not detected in linux,andorid not detected in eclipse,android device not detected in eclilpse,android not detected in eclipse in ubuntu,android device not detected in ubuntu