Save Time By Setting up replication onyour MySQL (Free web space)

March 18th, 2008

Save Time By Setting up replication onyour MySQL servers Backing up MySQL datawith mysqldump Using file system tools toback up MySQL data Taking care of businesswith MySQLAdministratorMaking a MySQLServer Your SQLServerMySQL is a fast, powerful, reliable, low-cost database that s distrib- uted with most Linux systems. You can use MySQL to store busi- ness records, baseball scores, user account information, networkconfigurations, and just about anything. MySQL is very flexible. One of the hallmarks of MySQL is that when itcomes to performance, you don t pay for features that you don t need. When you store data in a MySQL database, you can choose from a varietyof storage engines. If you don t need the extra reliability offered by securetransactions, you gain extra performance (and reduce multiuser con- tention) by using nontransactional tables. If the data that you re storingjust has to beright (maybe you re storing payroll information or cus- tomers credit card numbers), use InnoDB tables. They offer ACID (thatis, safe) transactions in exchange for a bit of performance. We don t have enough room to give you a complete overview of MySQL(we recommend Paul Dubois s wonderful book, MySQL [New Riders/ Sams Publishing]), so we give you a few tips that can make MySQL yourdatabase. In this technique, we cover these topics: Installing MySQL the easyway.The MySQL team has turned a com- plex procedure into a simple two-step process. Pushing your data to remote offices (or just spreading a heavy userload across multiple servers) with MySQL s replication features. Keeping your data safe by archiving it with MySQL-specific tools orfile system backup tools. Using the up-and-coming tool MySQL Administrator.MySQLAdministrator is an enterprise-level control center written by theMySQL team. It s designed for MySQL version 4 (and above), but manyfeatures work with older servers. 44Technique54_
In case you need affordable webhost to host your website, our recommendation is ecommerce web host services.

to kill off unwanted or runaway processes. Type (Cool web site)

March 18th, 2008

to kill off unwanted or runaway processes. Type k, type the process ID, and press Enter to ter- minate the process (see Figure 43-13). If you re running MySQL servers in a non- graphical environment, mtopis a definite time- saver. Getting acquainted with its features canhelp you monitor and manage your serverwith just a few keystrokes. Enter $ ./mtop –helpat the command lineto display a list of command line options touse at startup. Figure 43-13:mtopkilling off an unwanted process.
If you are in need for cheap and reliable webhost to host your website, we recommend http web server services.

Apache web server tutorial - you press Enter, the mtopdisplay opens, showing the

March 17th, 2008

you press Enter, the mtopdisplay opens, showing the activity on your MySQL server (seeFigure 43-12). Figure 43-12:mtopmonitoring a MySQL Server. Across the top of the display, you see the vital statis- tics on your MySQL server and its activity. The loadaverage, the length of time that the server has beenrunning, and performance indicators are all includedin the statistical information. Type ?while mtopis running to display a list of com- mand options. Here are some of the more usefuloptions: z: Type zand enter a process ID from theprocess list to zoom in on a process. e: Type eand enter a process ID from theprocess list to display the optimizer plan for thequery that is executing. s: Type sand enter the number of secondsbetween screen refreshing. u: Type uand enter a user name to display onlythe server transactions for the named user. q: Type qto quit. If a given query runs for a while, the color progressesfrom white to purple, yellow, and red to indicate thelength of time the query has run. You can use the kInstalling mtopTo install mtop, follow these steps: 1.Open your favorite Web browser and navigate tosourceforge.net/projects/mtop/ 2.Scroll down and click the download link for themost recent mtoprelease. 3.When the download page opens, click the linkto download the most recent tarball. 4.On the mirror page, click the link for the down- load site nearest you. 5.Save the file to your home directory. 6.Open a terminal window and give yourselfsuperuser privileges with the sucommand. 7.Extract the contents of the tarball with the fol- lowing command: # tar -xzvf mtop-0.6.4.tar.gz8.Move into the mtopdirectory: # cd mtop-0.6.49.Now you re ready to compile mtop. Enter thesecommands: # perl Makefile.PL# make# make installmtopis now installed in /usr/local/binand isready to use! Monitoring trafficmtopis a MySQL client application so you must pro- vide a MySQL user name when you run mtop. To startmtop, use the following command: $ ./mtop –dbuser=rootYou can substitute any reasonably privilegeduser for rootin our example.
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.

you use MySQL, the MySQL Control Center is (Msn web hosting)

March 17th, 2008

you use MySQL, the MySQL Control Center is ahandy tool to add to your collection. Check it out! Watching Your MySQL Trafficwith mtopMySQLCC is a great monitoring tool if you re runningin a graphical environment, but if you keep yourservers and data in a non-GUI environment, use mtop. mtopis a handy command line tool that lets you watchyour database traffic and transactions. You can alsouse mtopto help find and debug slow queries. Graphical tools are available everywhere nowa- days, but you can save money and improveperformance by keeping your MySQL serversin a nongraphical environment. Gathering all the packages that mtop needsYou need a number of prerequisite packages to runmtop. Obviously, you need to be running MySQL. Youalso need the mysql-develRPM package that goeswith the MySQL version you re running. Both areincluded on the Fedora and SuSE distributions andcan be added with either the Package Manager or asRPM packages from a distribution disc. If you re aMandrake user, you ll have to find the mysql-develpackage on the Web. You need to download and install a few Perl modulesbefore you can install mtop. The easiest way to installPerl modules is to use the CPAN (Comprehensive PerlArchive Network) interface. CPAN retrieves Perl mod- ulesand installs them on your system automatically. You need to have Internet access for themachine you re using CPAN with. To install Perl modules with CPAN, follow these steps: 1.Open a terminal window, give yourself super- user privileges with the sucommand, and enterthe following command: # perl -MCPAN -e install DBI 2.When you re asked if you re ready for manualconfiguration, type noand press Enter. CPAN continues to work, retrieving the Perl DBImodules. Depending on your system and connec- tion speed, this could take a few minutes. 3.Enter the following command: # perl -MCPAN -e install DBD::mysql If you have trouble installing the DBD::mysqlmodule, be sure you ve installed the mysql- develRPM package. DBD::mysqlwon tinstall without it. 4.Enter the following command: $ perl -MCPAN -e install Getopt::Long 5.Enter this command: $ perl -MCPAN -e install Net::Domain The last Perl module that you need is Curses. At thetime we re writing this, the Curses module availablefrom CPAN fails to install on Fedora (and possiblyother distributions as well). To install Curses, followthese steps: 1.Open a Web browser and surf tobastille-linux.org/perl-rpm-chart.html2.Click the most recent link to download perl- Curses (Text/Console). Currently, that version is for Red Hat 9; it worksfine with Fedora. 3.Save the RPM package to your home directory. 4.Open a terminal window and give yourselfsuperuser privileges with the sucommand. 5.Move to your home directory. 6.Install the perl-CursesRPM package with thefollowing command: # rpm -Uhv perl-Curses-1.06-219.i586.rpmNow that the program dependencies are in place, you re ready to download and install mtop, asdescribed in the next section.
Visit our web design programs services for an affordable and reliable webhost to suit all your needs.

Yahoo free web hosting - Right-click User Administration and chooseNew User from the

March 16th, 2008

Right-click User Administration and chooseNew User from the pop-up menu. The Add User dialog opens, as shown inFigure43-11. Figure 43-11:The Add User dialog. 3.Fill in the dialog and then click the Add buttonto add your new user. Figure 43-10: Live monitoring of activity on the MySQLserver. Adding a new userHere s how to add a new user with the MySQL ControlCenter: 1.Follow the steps in the section, AccessingMySQL Control Center features, earlier in thistechnique, to get to the User Administrationcontrols. TABLE43-1: USINGTHEMYSQL CONTROLCENTERSERVERADMINISTRATIONTOOLSTabWhat It DoesTimesaving Bonus InfoProcess ListDisplays a list of the MySQL Click the clock icon at the right end of the toolbar to turn the auto-refresh client sessionsoption on and off. With auto-refresh on, the Process List tab displays the on- going activities on your server (see Figure 43-10). If a process in the ProcessList is running slow, you can use the MySQL Control Center to kill it off. Check the box in the ID column to the left of the session and chooseAction.Kill Process. StatusDisplays statisticalThe values shown in the Status tab give you a detailed look at how your information about the serverMySQL server is being used. You can see the number of client connections, number of queries executed, as well as a count of how many times eachMySQL command has been executed since your server booted. VariablesDisplays configuration The Variables tab shows you each MySQL configuration parameter and its information for the serverinformation for the servercurrent value.
If you are in need for cheap and reliable webhost to host your website, we recommend http web server services.

Web site developers - Analyze Table:This tool updates the data sta- tistics

March 16th, 2008

Analyze Table:This tool updates the data sta- tistics used by the MySQL optimizer. Run thiswhen you ve made significant changes to thedata in your tables. Check Table:This tool checks the table forerrors. If you get an error message that youdon t understand, run Check Table to look forpossible problems. Repair Table:This tool repairs the table. Choose this tool if Check Table reports anyerrors. Optimize Table:This tool reclaims free spaceand rebuilds indexes to increase performance. Show Create:This tool displays the CreateTable and Create Index statements that cre- ated the table. Figure 43-8:The tools included with MySQLCC. After you select the tool that you want to run, apop-up window opens, displaying the tables inyour database (see Figure 43-9). 3.Choose the table you want the tool to act on andthen click the Action button (for the AnalyzeTable tool, it s labeled Analyze, for the CheckTable tool, it s labeled Check, and so on). Figure 43-9:Choose a table from the list. It s a good idea to analyze, check, and opti- mize your MySQL tables on a regular basis tokeep them in top form (database performancetends to degrade over time and the analyzeand optimize tools can give you a quick speedboost). If the Check Table tool reports anyerrors, use the Repair Table tool to correct theproblem. Putting the Server AdministrationcontrolstoworkFollow these steps to begin working with the ServerAdministration controls: 1.Follow the steps in the section, AccessingMySQL Control Center features, earlier in thistechnique, to find the Server Administrationcontrols. 2.Double-click the Server Administration entryon the tree control to open the AdministrationPanel. The panel has three tab controls. Table 43-1gives you a quick look at what each tab has tooffer.
Searching for affordable and proven webhost to host and run your servlet applications? Go to Linux Web Hosting services and you will find it.

Figure 43-6:A quick view (Sri lanka web server) of the fields within

March 15th, 2008

Figure 43-6:A quick view of the fields within a table. Figure 43-7:Table data displayed with the Control Center. The Databases controls include some handy tools tohelp you manage and repair your MySQL database: 1.Highlight Tables in the tree control and thenchoose Action.Tools to open the drop-downmenu (see Figure 43-8). 2.Choose an option from the Tools menu. Hereare your choices: 1.Follow the steps in the section, AccessingMySQL Control Center features, earlier in thistechnique, to access the controls. 2.Highlight the Databases entry, as shown inFigure 43-5. Figure 43-5:The Databases statistics. 3.Click the tree control next to the Databasesfolder to display the databases on the server. 4.Click the tree control next to the Tables entryto view the tables in the database. 5.Highlight a table name to view the fields withinthat table (see Figure 43-6). 6.Double-click the table name to see the datawithin that table. The table data is displayed, as shown inFigure43-7. You can adjust the number of rows displayed, but by default, MySQLCC displays the first1,000 rows. To adjust the default row limit, highlight the server (in the left-most pane), click the Edit button (in the toolbar), thenchoose MySQL Options and type a row countinto the limit field.
Go visit our java server pages services for a reliable, lowcost webhost to satisfy all your needs.

MySQL Control (Web hosting reseller) Center featuresAfter you install the MySQL

March 15th, 2008

MySQL Control Center featuresAfter you install the MySQL Control Center, you reready to take advantage of its handy tools. Here show to get to them: 1.Start the Control Center with the followingcommand: #./mysqlccThe MySQLCC window and the Register Serverdialog both open (see Figure 43-3). Figure 43-3:MySQLCC s opening view. 2.On the General tab of the Register Server dia- log, enter the name of the computer in the HostName field. If you have multiple MySQL servers running(scattered around your network), you maywant to enter a server name that s meaningfulto you in the Name field to make the differentservers easy to distinguish. 3.Click Add to display the session propertiesneatly in the Console Manager (see Figure 43-4). Figure 43-4: The Console Manager. 4.Double-click a server name in the MySQLServers frame to expand the tree control anddisplay the controls for Databases, ServerAdministration, and User Administration. 5.Highlight any entry in the Server tree control(Databases, Server Administration, or UserAdministration) to display status informationabout that aspect of the MySQL server. The following sections have more details on eachof these controls. Viewing, managing, and repairing a databasewith the Databases controlsThe Databases controls enable you to view yourdatabase, and you also have tools for managing dataand fixing problems as well. MySQLCC is a complete MySQL client application. You can use MySQLCC to execute SQL commandsand queries, but it s really designed to give youaquick overview of the state of your database. Toview the statistics for databases, follow thesesteps:
Searching for affordable and proven webhost to host and run your servlet applications? Go to Linux Web Hosting services and you will find it.

site (www.mysql.com). The Control Center (likeMySQL) is dual-licensed (Sex offenders web site)

March 15th, 2008

site (www.mysql.com). The Control Center (likeMySQL) is dual-licensed see the MySQL Web sitefor licensing specifics. Downloading and installing the MySQL Control CenterTo download and install the MySQL Control Center, follow these steps: 1.Open a browser and surf towww.mysql.com/downloads/mysqlcc.html2.Click the Pick a Mirror link for the Linux(x86,glibc 2.3) download. It s the second link in the Linux Downloads por- tion of the page. 3.When the Select a Mirror page opens, click anHTTP link from a mirror close to your location. 4.When the Download Manager opens, save thetarball to your home directory. We re telling you to download and installMySQLCC in your home directory for thesake of having a consistent point of referencefor this technique. You may want to save itelsewhere on your system. To make it easy torun (no matter where you install it), includethe directory in your search path so you canrun it without issuing the complete pathnameevery time. See Technique 7 to find out how. 5.Open a terminal window, give yourself super- user privileges with the sucommand, andunpack the tarball with the following command: # tar -xzvf \ mysqlcc-0.9.4-linux-glibc23.tar.gz6.Move into the mysqlcc-0.9.4-linux-glibc23directory: # cd mysql-0.9.4-linux-glibc23That s it! MySQLCC doesn t come with any fancyinstallers; you just load the program onto yourcomputer and run it as we describe in the nextsection. Changing the display time of apachetop statisticsBy default, apachetopdisplays statistics for only theprevious 30 seconds. Unless you have a lot of trafficat your server, you may want to extend the displaytime to hold the information longer. You can customize the apachetopdisplay toretain statistics about your server for a longeror shorter length of time, depending on yourneeds. If you have a lot of server traffic, short- ening the display time leaves you with easier- to-read reports. If your server traffic is low, alonger display time allows you to gather infor- mation over the course of hours for the sakeof comparison and easy monitoring. Use the following command to extend the displaytime to an hour (3600 seconds): # apachetop -T 3600The default refresh rate for the display is 5 seconds. If you have a lot of traffic and want the screen torefresh more often, use the following command: # apachetop -r 2Now, the screen refreshes every 2 seconds. Of course, you can combine display options on the commandline: # apachetop -r 2 -T 3600This command refreshes the statistics every 2 sec- onds and displays the request activities for the pre- vious hour. Monitoring MySQL Server withthe MySQL Control CenterOne cool tool for monitoring and maintaining yourMySQL databases in a graphical environment is theMySQL Control Center (MySQLCC). The MySQLControl Center is available from the official MySQL53_
From our experience, we are can tell you that you can find a reliable and cheap webhost service at Java Web Hosting services.

Photoshop web design - apachetopThe top portion of the apachetopdisplay (refer toFigure

March 14th, 2008

apachetopThe top portion of the apachetopdisplay (refer toFigure 43-1) shows the statistics for the server. Thelower portion of the display lists information aboutspecific HTTP requests. Here are some navigationtricks that help you find your way around apachetop: Use the up- and down-arrow keys to move theselection asterisk through the list of specificrequests. For more information about a specific request, move the cursor to the request line and pressthe right-arrow key. The request screen nowincludes the host and referrer IP addresses forthe visitor, as shown in Figure 43-2. Figure 43-2:Extended information about who s visitingyour server. To customize the information displayed about aspecific request from a user visiting your Apacheserver, type tto view the Toggle Subdisplaymenu. From here, type uto exclude URL information rto exclude or include referrer information hto exclude or include host informationWhen you re finished looking at detailed informa- tion about a specific request, use the left-arrowkey to return to the request list. You can sort the information in the request listby typing sto access the Sort By menu. Fromthis menu, you can choose from rto sort by the number of requests made Rto sort by the number of requests persecond bto sort by the size of the request in bytes Bto sort by the number of bytes per secondtransferredEnter #apachetop -hat the command line(or type ?while apachetopis running) to seeonline help. Switching among the log files (or watchingseveral at once) By default, Apache records activity in five differentlog files, which you can find in the /etc/httpd/logsdirectory: access_log error_log ssl_access_log ssl_error_log ssl_request_logAt configuration time, we told apachetopto watchthe access_log. To view entries in one of the otherlog files, use the following command: # apachetop -f /etc/httpd/logs/filenameYou can watch many log files at the same time byappending multiple -f logfileoptions to the end ofthe command line: # apachetop -f /etc/httpd/logs/access_log\ -f /etc/httpd/logs/error_log \ -f /etc/httpd/logs/ssl_access_log\ -f /etc/httpd/logs/ssl_error_log53_
In case you need quality webspace to host and run your web applications, try our personal web hosting services.