Phoenix Technologies and Solutions Blog

05
Oct

Granting privileges in MySQL

When you setup a user in MySQL you may want to allow that user to have privileges for one database. You can use a grant statement.

Example:

GRANT ALL PRIVILEGES ON some_database.* TO ’some_user’@'localhost’ IDENTIFIED BY ’some_password’;

This will allow “some_user” to add tables,delete tables, and make changes to the database “some_database”.

For more information or technical support by phone for MySQL call us at 410-838-5100 or email us at experts@expertsinunix.com
Skype: solution1000

04
Oct

Obtaining a Valid IP Address in Windows with DHCP

If your settings are correct and you are still not able to connect you may have been assigned an invalid IP address. In order to get a renewed IP address follow this procedure:

1. Click on your Start button and select Run. In the Open field type command, and click OK.

2. A black window with a flashing cursor will appear. At the prompt type ipconfig, and hit .

Ipconfig

3. Find the IP address. If your IP address is 169.x.x.x or is all zeros then your hardware may not be installed correctly or functioning properly. If your IP address is 192.168.x.x or 10.x.x.x then you are on a local area network and/or behind a router/firewall.

4. Type ipconfig /release to clear the address, and then type exit.

5. Go back to the command prompt by clicking on Start and selecting Run; in the Open field type command, and then click on OK.

6. Now type ipconfig /renew to get a new IP address. Keep doing this until you get an IP address that begins with the with first number being what you expect.

For more information or support please call 410-838-5100 or email us at experts@expertsinunix.com
Skype: solution1000

01
Oct

Changing the Remote Desktop port in Windows

To change the Remote Desktop port in windows you will need edit the registry.

Open regedit

Go to the following key:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\

modify port number

Right click on PortNumber and choose Modify (or select PortNumber, then click on Edit menu and Select Modify).

modify port number

On the Edit DWORD Value window, click on Decimal.
Type in the new port number on the Value Data text box.
Click OK when done.

For more information or support for call 410-838-5100 or email us at experts@expertsinunix.com

Skype: Solution1000

30
Sep

Creating a batch file at the command prompt in Windows

Sometimes it would be helpful to create your own commands in windows. You can do this using the command or DOS prompt. You can start the command prompt by going to start run and type “cmd”.

You can use the edit command at the command prompt or use an editor like notepad.

A simple script to do some maintenance on your D: drive will serve as an example:

Maintenance.bat

rem Batch file to do maintenance on d drive
rem Make sure we start on c: drive
echo “Starting drive maintence on the D drive”
echo “Changing to the C drive”
c:
rem Run chkdsk on the d drive
echo “Running chkdsk on the D drive”
chkdsk /f /r /x d:
rem Defrag the d drive
echo “Defragging the D drive”
defrag d: -f -v
echo “D drive maintenance complete”
exit

The rem statement is a remark. This allows you to put comments in your batch file.
The echo statement prints to the screen. This allows you to follow the progress of your script.
the chkdsk runs check disk on drive D
the defrag defrags drive D
the exit statement exits the script.

You can get help on each command by type “help command”. To get a list of available commands type “help” by it self.

You can then put the script as a scheduled task to run on a regular basis.

For MyPTSMail users support is free.

For more information or tech support by phone on the command prompt call 410-838-5100 or email us experts@expertsinunix.com.
Skype: solution1000

26
Sep

Using tasklist and taskkill at the windows command prompt

Using tasklist and taskkill at the command prompt allows you to do what you can do with task manager in windows.

Example:

C:\>tasklist

Image Name PID Session Name Session# Mem Usage
========================= ====== ================ ======== ============
System Idle Process 0 Console 0 16 K
System 4 Console 0 212 K
smss.exe 288 Console 0 392 K
csrss.exe 336 Console 0 1,216 K
winlogon.exe 364 Console 0 6,364 K
services.exe 408 Console 0 3,436 K
lsass.exe 420 Console 0 1,360 K
ati2evxx.exe 556 Console 0 2,056 K
svchost.exe 604 Console 0 4,968 K
svchost.exe 684 Console 0 4,252 K
MsMpEng.exe 724 Console 0 30,908 K
svchost.exe 816 Console 0 29,000 K
svchost.exe 848 Console 0 3,568 K
explorer.exe 1092 Console 0 21,156 K
spoolsv.exe 1136 Console 0 5,448 K
svchost.exe 1344 Console 0 6,440 K
mDNSResponder.exe 1396 Console 0 2,768 K
svchost.exe 1468 Console 0 3,356 K
sqlservr.exe 1500 Console 0 15,736 K
ClamTray.exe 1600 Console 0 19,416 K
sqlservr.exe 1648 Console 0 6,496 K
ctfmon.exe 1656 Console 0 2,984 K
Spark.exe 1668 Console 0 53,824 K
wmpnscfg.exe 1676 Console 0 3,460 K
btdna.exe 1688 Console 0 6,004 K
sqlbrowser.exe 1920 Console 0 2,196 K
svchost.exe 1988 Console 0 4,028 K
MXTask.exe 2012 Console 0 2,864 K
MXTask.exe 856 Console 0 14,940 K
wmpnetwk.exe 900 Console 0 8,112 K
alg.exe 1912 Console 0 3,092 K
wscntfy.exe 2404 Console 0 2,064 K
firefox.exe 3448 Console 0 134,208 K
putty.exe 3604 Console 0 4,840 K
putty.exe 4008 Console 0 1,880 K
putty.exe 2388 Console 0 4,492 K
AcroRd32.exe 1928 Console 0 54,900 K
cmd.exe 2596 Console 0 916 K
notepad.exe 208 Console 0 3,128 K
tasklist.exe 3508 Console 0 4,232 K
wmiprvse.exe 3464 Console 0 5,568 K

C:\>

Then using taskkill you can terminate a process.

C:>taskkill /PID 3448

This will kill the firefox browser.

For more information or technical support call 410-838-5100 or email us at experts@expertsinunix.com
Skype: solution1000

25
Sep

Using the Windows PATH command

On a windows system executable files are found by looking in your PATH. This variable can be set by right clicking on “My Computer” and clicking the “advanced” tab. At the bottom you will see the “Environment Variables” button. Click on it and you will see a list of system variables, one of which is the PATH. You can add or remove directories to your path here.

If you need to do it from the command prompt or in a batch file you will use the PATH command.

To display your path, just type in path.
Example:
C:\PATH

To set the PATH use the following syntax:
PATH [[drive:] path;…][;%PATH%]

Example:
PATH d:\temp;%PATH%

This will add the folder temp on the D drive to your path. When you close the command prompt window. d:\temp will no longer be in your path. To add it to your permanent path edit the Environment Variables.

For more information or support please call 410-838-5100 or email us experts@expertsinunix.com
Skype: solution1000

24
Sep

Getting network information at the windows command prompt

One of the advantages of the windows command line is it sometimes quicker to get information than moving around in windows. Network information is one of them.
Some useful commands are nslookup:
Example:
C:\>nslookup www.yahoo.com
Server: h-72-244-227-36.mclnva23.covad.net
Address: 72.244.227.36
Non-authoritative answer:
Name: www.yahoo-ht3.akadns.net
Address: 69.147.76.15
Aliases: www.yahoo.com
C:\>
As you can see this will check a domain name and give you the IP address back.

Another is ipconfig

Example:
C:\>ipconfig /all

Windows IP Configuration

Host Name . . . . . . . . . . . . : Workstation1
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Local Area Connection 6:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek RTL8139 Family PCI Fast Ethernet NIC
Physical Address. . . . . . . . . : 00-C0-A8-7B-D6-66
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.0.48
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1
DNS Servers . . . . . . . . . . . : 72.244.227.36
72.244.227.37

C:\>

This tells you the current configuration of your network and is quick.

For more information or tech support by phone for windows or the command prompt call 410-838-5100 or email us experts@expertsinunix.com
Skype: solution1000

23
Sep

Technical Support for Windows and Unix by phone or video

Are you a System Administrator who has too much on your hands?
Not able to enjoy a vacation because there is no one else qualified to take care of your system? Wouldn’t it be nice if there was a technician on call to help with projects and emergencies? Would you like to have a backup technician when you are out of the office? We can help you. We offer phone and video support. Talk with a support tech with a video call and receive the help you need.

Call US: (410) 838 5100 or Email US: experts@expertsinunix.com

Specializing in Unix and Windows servers and networks, PTS has the expertise needed to create customized software for any type of business. Need help with freebsd, linux, or Solaris? Support is available on a per incident basis, as well as more comprehensive support contracts including 24/7 support. We can help you with MYSQL, Windows servers and clients, Unix, Networking, PHP,Perl programming, C programming and more. Do you have DNS issues? Do you need help with sendmail? Need help moving from server to another? What about Exchange or IIS? Do you have registry issues or your Windows systems? Whether it is a short or long range project we can provide the support and expertise you need. For more info about what Phoenix Technologies & Solutions can offer you visit our products & services page. You can also call 410-838-5100 or email us at experts@expertsinunix.com
Skype: solution1000

Call support - PTS Support:

» Get Skype, call free!
22
Sep

Bat file for for performing chkdsk on primary drive

If you want to perform a chkdsk on your C: Drive and schedule it you can use the following file.

maintenance.bat

Rem System Maintenance Script
Rem Do defrag first
Rem defrag C: Drive
REM defrag -f -v c:
Rem Set chkdisk to do full scan of C Drive
echo Y | chkdsk /f /r /x c:
Rem reboot system
shutdown /r /f
exit

This script will defrag your c drive and run chkdsk and reboot the system. You can schedule this to run for periodic maintenance.

For more information or support call 410-838-5100 or email us at experts@expertsinunix.com.
Skype: solution1000

19
Sep

Using ftp in a shell script or in windows

Using ftp in a Unix shell script can be useful in certain situations. An example script is as follows:

#!/bin/sh
HOST=’host.toconeecto.com’
USER=’loginid’
PASSWD=’loginpassword’
FILE=’fileiwantotranser.txt’

ftp -n $HOST < quote USER $USER
quote PASS $PASSWD
put $FILE
quit
END_SCRIPT
exit 0

To do the same thing under windows the script would look like the following:

user
loginid
loginpasswd
put fileiwantotranser.txt
quit

ftp -s:myscript.scr host.toconeecto.com

For more information or technical support by phone for ftp call 410-838-5100 or email us at experts@expertsinunix.com
Skype: solution1000

© 2008 Phoenix Technologies and Solutions Blog | Entries (RSS) and Comments (RSS)

Design by Web4 Sudoku - Powered By Wordpress