Support for MySQL, Sendmail,Unix,Windows and more

17
Jun

Windows Command prompt tricks

Copy and Paste Text

If you have ever tried to copy and paste stuff into the command prompt window, you must have discovered that Ctrl+C and Ctrl+V doesn’t work. You can however copy text from other applications, right click on the command prompt windows and click Paste. But how do you copy text from the command prompt? There is a strange way to do it.

First right-click inside the command prompt window and click on Mark. The title bar of the window should read Mark Command Prompt.

cmd1[3]cmd2[4]

Now drag a box around the text you want to copy. The selected text will get highlighted.

cmd3[4]

Right-click again to automatically copy the selected text into the clipboard. Now again right click and choose the paste option to paste the text. You can also paste this text into other Windows applications.

There is an easier way to copy paste text in command prompt.

Right-click on the title bar and click Properties. Under the Options tab check the box for QuickEdit Mode.

cmd4[4]

Now you can straightaway drag and select text you want to copy, right-click to copy the text to the clipboard and right-click once again to paste it at the desired location. No need to go into the context menu to choose Paste. This option can be enabled either for the current command prompt window or for all instances of command prompt.

Command Prompt History

Do you know that command prompt has a history? Simply press F7 to display the list of commands entered during the current session. Use the arrow keys to select and command from the list you want to run.

cmd-history_thumb[3]

To run the previously entered command press F3. To run any command from the history list by it’s number, press F9 and type the command number.

3. Drag and drop to enter file path

There are two ways to execute applications using the command line – 1) navigate into the directory where the application resides using the CD command and then type the application name, or 2) type the full path of the application from any location. Either way, it involves lot of typing particularly if the application is inside directories several levels deep.

The easiest way to avoid typing the path name is to simply drag the applications icon into the command window and release it to automatically enter the path of the application. Now you just have to press Enter to run it. You can also drag folders into the command prompt window.

AutoComplete

To help you with entering commands and file paths, the command prompt also has an auto complete feature which allows you to complete filenames without typing the entire name. Type the first few characters and click TAB to cycle through all available filenames and folders.

Full Screen Mode

In the days of DOS, the command window ran full screen. But from Windows 2000 it started running inside a window. If you prefer to run it full screen, press ALT+ENTER to go into full screen mode. Use the same shortcut to exit full screen. Notice that Windows Media Player uses the same shortcut for running full screen, so this should be easy to remember.

Customize the look of the command prompt

If you are tired of the black screen, you can make a few changes to make it look livelier. All customization options are available by right-clicking on the title bar and clicking Properties. Change cursor size, window size, fonts, colors and more.

cmd-colors
cmd-colors[4]

16
Jun

PHP passing Variables from One Page to Another

Pass post data to another page

Here is a simple example of how to pass a PHP variable from one page to another with the post method, and how to use the POST super global array to make your coding experiences more efficient and less time-consuming. Let’s start with another HTML form. In this form I need to collect 5 first names at one time.

Form example No. 1

0.



1.



2.



3.



4.



Values sent to the server corresponding to “first_name0″ through ” first_name4″ will each occupy its’ own space in the $_POST super global array. Now, let’s write a piece of code on how to get those variables from the server to my script “array_script.php.”

$first_name0 = $_POST['first_name0'];

$first_name1 = $_POST['first_name1'];

$first_name2 = $_POST['first_name2'];

$first_name3 = $_POST['first_name3'];

$first_name4 = $_POST['first_name4'];

?>

Now, I can use the variables that I sent over from my form. That is the simplest explanation of how to pass variables from one page to another. I also could have used “get” instead of “post” for the “method” attribute in (Form example No. 1). In that case, I would replace “$_POST” with “$_GET” in the script. One difference is that if you use $_GET to access a variable, users can inject any value they want, and send it to your script. In some cases this may present a serious security problem. “get,” however, makes it possible for you to pass variables via links.

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

03
Jun

How to change background color of command prompt

To change the color of the command prompt in windows do the following:

Open the command prompt
Click on the “C:\” icon beside “Command Prompt” on the title bar.
Click on Default and then the Colors tab.

For more information or technical support for the Windows command prompt call 410-838-5100 or email us at experts@expertsinwindows.com
Skype: solution1000

29
May

The mysqldump Utility

What is mysqldump?

The mysqldump utility is a console-driven executable that lets us specify a host of options to backup a database to an external resource, such as a file, or even a completely different MySQL server running on the other side of the world!

I’m using the word “backup” rather loosely here, because MySQL doesn’t actually backup our data per se. Rather, it creates a set of “CREATE TABLE” and “INSERT INTO” commands that can be executed against a MySQL server to re-create our database(s).

The mysqldump utility can usually be found in c:\mysql\bin on Windows operating systems, and in the /usr/local/mysql/bin directory on Unix/Linux systems where MySQL is installed. The mysqldump utility accepts several command-line arguments that you can use to change the way your databases are backed up.

In its simplest form, the mysqldump utility can be used like this:

mysqldump —user [user name] —password=[password]
[database name] > [dump file]

Let’s take a look at each of the arguments that can be passed to the mysqldump utility, as shown above:

–user [user name]: The —user flag followed by a valid MySQL username tells MySQL the username of the account that we want to use to perform the database dump. MySQL user accounts are stored in the “user” table of the “mysql” database. You can view a list of users and their permissions for your MySQL server by inserting the following code at the MySQL command prompt:

use mysql;
select * from user;

–password=[password]: The password for the user account mentioned above.

[database name]: The name of the database that we would like the mysqldump utility to backup. Instead of specifying one single database name, we could use either –databases or –all-databases to backup every single database on our MySQL server.

> [dump file]: If you’re familiar with DOS and batch files, then you’ll know that the “>” symbol specifies that we’re directing output to a stream, port, or file. For the mysqldump utility, we prepend a “>” to the filename to which we would like our database to be backed up. If no path is specified for the file, then it will be created in the current directory.

Now that we’re versed in the basic arguments that can be passed to the mysqldump utility, let’s take a look at five different ways to use the mysqldump utility to backup our databases.
Method 1

mysqldump —user admin —password=password mydatabase > sql.dump

In the example above, we’re specifying that MySQL should check the grants for the user account of the “admin” user with a password of “password”. I’m running MySQL on Windows 2000, and these are the default credentials for the admin user account. I’ve chosen to backup the database named “mydatabase” into the file sql.dump.

If you’re not sure what the names of your databases are, then use the following command at the MySQL command prompt to list them:

show databases;

On my system, MySQL responded with this:
678example1.gif (click to view image)

Here’s a snippet of my database dump using the mysqldump utility as described in the example above:

#
# Table structure for table ‘tbl_contactemails’
#

CREATE TABLE tbl_contactemails (
pk_ceId int(11) NOT NULL auto_increment,
ceEmail varchar(250) NOT NULL default ”,
ceType int(11) default NULL,
PRIMARY KEY (pk_ceId),
UNIQUE KEY id (pk_ceId)
) TYPE=MyISAM;

#
# Dumping data for table ‘tbl_contactemails’
#

INSERT INTO tbl_contactemails VALUES (18,’mitchell@devarticles.com’,1);
INSERT INTO tbl_contactemails VALUES (17,’mitchell_harper@hotmail.com’,1);
INSERT INTO tbl_contactemails VALUES (16,’mytch@dingoblue.net.au’,1);

As you can see, the mysqldump command has taken the design of my tbl_contactemails table (which exists as part of the “mydatabase” database that I chose to back up) and turned it into a CREATE TABLE query, which (when imported back into MySQL) will re-create the tbl_contactemails table if it needs to.

Also notice the three INSERT INTO statements, which add rows of data to the tbl_contactemails table. I had three email addresses in my contact emails table, and when this data is restored, MySQL will execute these insert commands directly against my tbl_contactemails database, to add the rows back into the table.

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

26
May

Using Disk cleanup in Windows XP

Regular Windows system maintenance should include the removal of unnecessary temporary files that the system accumulates.

disk-cleanup

Although it has some limitations , Disk Cleanup may be sufficient for many home PC users to help keep their system clean. The tool can be accessed in several ways .It is listed in the Start-All Programs- Accessories-System Tools group. It can also be opened by right-clicking on a drive icon in My Computer, choosing “Properties” from the context menu, and clicking the button “Disk Cleanup” on the properties sheet. Perhaps the quickest way to open the accessory is to enter “cleanmgr.exe” into the Start-Run line. (Actually, just entering “cleanmgr’ is normally sufficient.) If you have more than one disk volume or hard drive, you will be asked to select the volume that should be cleaned. The figure on the left shows the main interface. Various different folders which store temporary files are listed. Certain listings are standard for all systems while others may vary according to an individual setup. The standard list includes Downloaded Program Files,Temporary Internet Files, the Recycle Bin, and Temporary files. The item “Downloaded Program Files” has a name that confuses many PC users. It does not refer to downloaded software programs but is a folder that contains ActiveX and Java applets that are sometimes downloaded for temporary use by Internet sites.

The entries of primary interest to the average home PC user are Temporary Internet Files, the Recycle Bin, and Temporary files. All can be cleaned by other routes but it is convenient to have them collected in one interface. The “Temporary files” listing refers to the Temp folder defined by the environment variable %TEMP% and does not necessarily provide for cleaning all Temp folders. Usually it will refer to the folder \Documents and Settings\{User}\Local Settings\Temp. In addition, a system may have other Temp folders such as \Windows\Temp. These are not cleaned in the default setup.

For more information or support for Windows disk cleanup call us at 410-838-5100 or email us at experts@expertsinwindows.com
Skype: solution1000

21
May

Recover MySQL root password

You can recover MySQL database server password with following five easy steps.

Step # 1: Stop the MySQL server process.

Step # 2: Start the MySQL (mysqld) server/daemon process with the –skip-grant-tables option so that it will not prompt for password

Step # 3: Connect to mysql server as the root user

Step # 4: Setup new root password

Step # 5: Exit and restart MySQL server

Here are commands you need to type for each step (login as the root user):
Step # 1 : Stop mysql service

# /etc/init.d/mysql stop
Output:

Stopping MySQL database server: mysqld.

Step # 2: Start to MySQL server w/o password:

# mysqld_safe –skip-grant-tables &
Output:

[1] 5988
Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[6025]: started

Step # 3: Connect to mysql server using mysql client:

# mysql -u root
Output:

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.15-Debian_1-log

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql>

Step # 4: Setup new MySQL root user password

mysql> use mysql;
mysql> update user set password=PASSWORD(”NEW-ROOT-PASSWORD”) where User=’root’;
mysql> flush privileges;
mysql> quit
Step # 5: Stop MySQL Server:

# /etc/init.d/mysql stop
Output:

Stopping MySQL database server: mysqld
STOPPING server from pid file /var/run/mysqld/mysqld.pid
mysqld_safe[6186]: ended

[1]+ Done mysqld_safe –skip-grant-tables

Step # 6: Start MySQL server and test it

# /etc/init.d/mysql start
# mysql -u root -p

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

14
May

How to Convert FAT Disks to NTFS in Windows

Converting to NTFS Using Convert.exe

convert

To convert a volume to NTFS from the command prompt

1.

Open Command Prompt. Click Start, point to All Programs, point to Accessories, and then click Command Prompt.
2.

In the command prompt window, type: convert drive_letter: /fs:ntfs

For example, typing convert D: /fs:ntfs would format drive D: with the ntfs format. You can convert FAT or FAT32 volumes to NTFS with this command.

Important Once you convert a drive or partition to NTFS, you cannot simply convert it back to FAT or FAT32. You will need to reformat the drive or partition which will erase all data, including programs and personal files, on the partition.

For more information or support for converting file systems in windows call us at 410-838-5100 or email us experts@expertsinwindows.com
Skype: solution1000

12
May

Using pscp to copy files to Unix servers

If you want to back up files from windows to a unix system, try using pscp.

The options for pscp are as follows:

C:\>pscp -h
PuTTY Secure Copy client
Release 0.53b
Usage: pscp [options] [user@]host:source target
pscp [options] source [source...] [user@]host:target
pscp [options] -ls user@host:filespec
Options:
-p preserve file attributes
-q quiet, don’t show statistics
-r copy directories recursively
-v show verbose messages
-load sessname Load settings from saved session
-P port connect to specified port
-l user connect with specified username
-pw passw login with specified password
-1 -2 force use of particular SSH protocol version
-C enable compression
-i key private key file for authentication
-batch disable all interactive prompts
-unsafe allow server-side wildcards (DANGEROUS)

Here is an example of a user using PSCP to connect to machine server.example.com as user sshuser and downloading the file named test.pl to the current directory:

C:\>pscp sshuser@server.example.com:test.pl .
sshuser@server.example.com’s password: ********
test.pl | 0 kB | 0.1 kB/s | ETA: 00:00:00 | 100%

C:\>

Here is an example of a user using PSCP to connect to machine server.example.com as user sshuser and uploading all files named test.* to /tmp:

C:\>pscp test.* sshuser@server.example.com:/tmp
sshuser@server.example.com’s password:
test.c | 0 kB | 0.1 kB/s | ETA: 00:00:00 | 100%
test.sh | 0 kB | 0.2 kB/s | ETA: 00:00:00 | 100%

C:\>

Using these examples you can batch files to copy files and directories to your Unix servers from your work stations.

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

11
May

Restoring from a mysql dump

If you are doing full database dumps using the mysqldump command like the following

mysqldump -u USER -pPASSWORD DATABASE > dump.sql

you can restore the database using the following:

mysql -u USER -p DBNAME < dump.sql

You might have to make sure the database you're importing into is
EMPTY because the import command listed above will not overwrite
structures existing already. You can use the MySql Query Broswer or another set of delete/remove table commands to make sure the structures you're importing do not already exists in the database you're importing into.

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

15
Apr

Setting Up Outlook 2007 to Get Your E-mail

Set Up Outlook 2007 to Get Your E-mail

You can automatically set up Office Outlook 2007 to access your account from the Outlook.com Web site using only your e-mail address and password sign-in information. Currently only the 2007 version of the program is supported.
How do I set up Outlook 2007 to get my e-mail from Outlook.com?

1. Close Outlook 2007 if it’s open.
2. In Control Panel, click Mail.
In Windows XP
1. Click Start > Control Panel > User Accounts > Mail. (In Classic view, double-click Mail.)
In Windows Vista
1. Click Start > Control Panel.
2. In the 32-bit edition of Windows Vista, click User Accounts (or User Accounts and Family Safety) > Mail. In the 64-bit edition of Windows Vista, select Additional Options > View 32-bit Control Panel Items, and then double-click Mail. (In Classic view, double-click Mail.)
3. In the Mail Setup dialog box, click Show Profiles > Add.
4. Type a name for the profile and then click OK. (As a best practice, give the profile a name that identifies it as the profile for your account on Outlook.com.)
5. When the Add New E-Mail Account dialog box opens, enter your name, e-mail address, and password in the appropriate fields, and then click Next.
6. Outlook 2007 will display a message that asks you to allow a Web site to automatically set up your account. The program runs auto-setup periodically. If you don’t want to see this message every time auto-setup runs, select Don’t ask me about this website again, and then click Allow.

Outlook 2007 will automatically set up the account. You’ll be asked for your user name and password before Outlook 2007 can connect to your account. Make sure you enter your full e-mail address (for example, myaccount@domain.com) as your user name. You may be prompted to enter your user name and password several times before you connect.

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

© 2009 Support for MySQL, Sendmail,Unix,Windows and more | Entries (RSS) and Comments (RSS)

Design by Web4 Sudoku - Powered By Wordpress