Showing posts with label MySQL. Show all posts
Showing posts with label MySQL. Show all posts

Monday, April 28, 2008

Sun Microsystems Introduces MySQL Workbench

Sun Microsystems, Inc. (NASDAQ:JAVA) today announced the availability of MySQL(TM) Workbench, a new visual database design tool that integrates data modeling, physical database design, database creation, change management and documentation capabilities into a single, seamless environment for MySQL developers and DBAs.
MySQL Workbench is available for download in two versions: an open source Community Edition and a (US) $99 commercial Standard Edition. Both are available now for Microsoft Windows, with future cross-platform support for Linux and Macintosh OS X under development.

The announcement was made this morning at the sixth annual MySQL Conference and Expo. With nearly 2,000 attendees, it is the world's largest community event for open source database developers, users, DBAs, vendors and corporate IT managers.

"We are very happy to deliver a powerful open source database design tool for the MySQL ecosystem," said Michael G. Zinner, Sun's team lead for database developer tools and the original developer of the popular DBDesigner4 open source software project. "The two editions are designed to meet the needs of the do-it-yourself community developer, while providing a very affordable and compelling commercial product for the corporate database professional."

The MySQL Workbench Community Edition is freely available for download under the open source GPL license at dev.mysql.com/workbench. This full-featured tool provides a base framework for data modeling and physical database design.
The MySQL Workbench Standard Edition is a commercial extension to the community edition that adds specialized plug-in modules that can boost productivity and save time. These include reverse- and forward-engineering capabilities, synchronization to and from live databases, HTML and text-based documentation, built-in validation of models and security management for modeled objects. At the MySQL Online Shop (http://shop.mysql.com), users can purchase a (US) $99 subscription for a perpetual single-seat license and software updates for a full year.
As a special introductory promotion, customers who purchase or renew MySQL Enterprise(TM) silver, gold and platinum level subscriptions by June 30, will receive a complimentary one-year subscription for MySQL Workbench Standard Edition*.

More information and a feature comparison chart is at www.mysql.com/workbench. Volume license discounts for multiple seats are also available for purchase.

MySQL Workbench Improves Productivity for Users

"MySQL Workbench SE has allowed our team to improve productivity and deliver products on time and within budget. The tool is very intuitive and we find our new staff can ramp up quickly. This tool has significantly reduced the task-time of our data modeling, leaving more time to concentrate on quality. It also helps eliminate defects early in our development phase."
Jamie Schultz, vice president of Operations
B Three Solutions, Inc.

"We've looked at many applications to manage database development, and MySQL Workbench is the best. It's an amazingly powerful database management front-end that's also easy to learn. I use it exclusively now for most data design tasks -- from advanced data modeling to general database administration. I recommend it."
Kevin Haas
OpenBI, LLC

"MySQL Workbench SE is a powerful visual design tool. I have tried other modeling tools, but the learning curve was too steep. With Workbench, I was up-and-running within minutes. From now on, MySQL Workbench will be an integral part of my development toolkit."
David Alsbury, CEO/President
Alsbury Media Group

About Sun's MySQL Database

MySQL is the most popular open source database software in the world. Many of the world's largest and fastest-growing organizations use MySQL to save time and money powering their high-volume Web sites, critical business systems, and packaged software. At www.mysql.com, Sun provides corporate users with commercial subscriptions and services, and actively supports the large MySQL open source developer community.

About Sun Microsystems, Inc.

Sun Microsystems develops the technologies that power the global marketplace. Guided by a singular vision -- "The Network is the Computer"(TM) -- Sun drives network participation through shared innovation, community development and open source leadership. Sun can be found in more than 100 countries and on the Web at http://sun.com

Sun, Sun Microsystems, the Sun logo, MySQL, MySQL Enterprise, and The Network is the Computer are registered trademarks of Sun Microsystems in the United States and other countries.

*Standard subscription terms apply.

Source: PRWeb

Tuesday, April 15, 2008

Sun Microsystems Announces MySQL 5.1

Sun Microsystems, Inc. (NASDAQ:JAVA) today announced the pending general availability of MySQL(TM) 5.1, a new version of the world's most popular open source database, designed to improve performance and simplify management of large database applications. A near-final release candidate of the GPL software is available for download now at http://dev.mysql.com/downloads/.

The announcement was made this morning at the sixth annual MySQL Conference and Expo. With nearly 2,000 attendees, it is the world's largest community event for open source database developers, users, DBAs, vendors and corporate IT managers.

“If our users initially choose MySQL because of its low cost, they continue to use MySQL for its high performance, scalability and broad platform support,” said Marten Mickos, SVP, Database Group, Sun Microsystems. “MySQL 5.1 continues this tradition by performing up to 15 percent faster than previous versions in our own internal tests – making it a compelling solution for demanding Web-based enterprise applications.”

"We're using MySQL 5.1 in production for a Weblog discovery code database which indexes approximately 18 million URLs per day," said Kevin Burton, founder and CEO of Spinn3r.com. "The new features in 5.1 extend the ease-of-use, scalability, and performance that MySQL is already famous for, so it can continue to meet the increasingly-demanding requirements of today's database applications."

MySQL 5.1 features a number of new enterprise enhancements, including:

  • Table and Index Partitioning – MySQL 5.1 supports five forms of horizontal data partitioning: range, hash, key, list, and composite (sub-partitioning). By partitioning table and index data, faster query response times can be achieved as only the relevant partitions of data need to be scanned, instead of the entire table or index. Further, various storage and other maintenance operations are made much easier and accomplished more quickly via partitioning.
  • Row-Based and Hybrid Replication – new replication options are now available in MySQL 5.1. Row-based replication replicates the data changes (rather than the actual SQL statements) between a master server and its slave servers, and hybrid replication uses either statement-based or row-based replication depending on the individual SQL operations – these achieve and maintain the most efficient and safest replication scheme for the application.
  • Event Scheduler – This new tool allows developers and DBAs automatically schedule common recurring SQL-based tasks to execute on the database server. It provides greater support for database-specific tasks than is available through CRON in Linux or Unix(R) or the Microsoft Windows task scheduler.
  • New Upgrade Advisor in MySQL Enterprise Monitor – Available to MySQL Enterprise(TM) subscribers, the new Upgrade Advisor provides automated rules that monitor and advise DBAs about specific bugs that can might impact their deployed versions of MySQL 5.1. When potential issues are detected, subscribers are given recommendations how to upgrade their database servers to correct the problem.

Platforms & Availability

MySQL 5.1 is scheduled to be generally available this quarter for a wide variety of hardware and software platforms, including Red Hat Enterprise Linux, SuSE Enterprise Linux Server, Microsoft Windows, Solaris(TM) 10 Operating System, Macintosh OS X, Free BSD, HP-UX, IBM AIX, IBM i5/OS and other popular Linux distributions.

The MySQL 5.1 GA release will be available in three ways to serve different audiences:

  • The MySQL Community Server – The freely-available, open source version of Sun's MySQL database. Licensed under the GPL, this full-function software is targeted to a technical, do-it-yourself audience, who does not require commercial support or premium add-on services.
  • The MySQL Enterprise Server – Available as part of a MySQL Enterprise subscription, this is the most reliable, secure, and up-to-date version of the MySQL database, targeted to corporate IT users. Subscribers receive monthly rapid software updates and quarterly service packs with the latest fixes -- along with access to proactive monitoring tools and 24x7 production technical support.
  • The MySQL Embedded Server – This commercially-licensed version of the MySQL software allows ISVs and OEMs to embed or bundle a high-speed, small-footprint database with their own products, without the free-distribution requirements of the GPL license.

For downloads and more information on MySQL 5.1, please visit http://dev.mysql.com/downloads/.

About Sun's MySQL Database

MySQL is the most popular open source database software in the world. Many of the world's largest and fastest-growing organizations use MySQL to save time and money powering their high-volume Web sites, critical business systems, and packaged software. At http://www.mysql.com/, Sun provides corporate users with commercial subscriptions and services, and actively supports the large MySQL open source developer community.

About Sun Microsystems, Inc.

Sun Microsystems develops the technologies that power the global marketplace. Guided by a singular vision -- "The Network is the Computer"(TM) -- Sun drives network participation through shared innovation, community development and open source leadership. Sun can be found in more than 100 countries and on the Web at http://sun.com/

Sun, Sun Microsystems, the Sun logo, MySQL, MySQL Enterprise, Solaris, and The Network is the Computer are registered trademarks of Sun Microsystems in the United States and other countries. UNIX is a registered trademark in the United States and other countries, exclusively licensed through X/Open Company Ltd.

Source: PRWeb

Continuent Announces New uni/cluster 2008 for MySQL

Continuent, Inc., the leading provider of commercial open source middleware solutions for database high availability, today announced Continuent™ uni/cluster 2008. This newest version of Continuent's uni/cluster software provides the highest levels of availability and scalability for applications built using the MySQL® database.

Continuent uni/cluster offers a multi-master approach to replication. Data is committed and available to all nodes in the cluster simultaneously, effectively eliminating data latency. The elimination of data latency also allows uni/cluster to offer more effective load balancing because any database server can be used to process user queries.

New features in Continuent uni/cluster 2008 include:

  • support for more than two cluster controllers and
  • platform-independent, Adobe® AIR™-based GUI cluster management tools.
  • official MySQL 5.1 certification,
  • Solaris™ support and Red Hat® 5 certification,
"As organizations continue to adopt MySQL and other open source technologies for business-critical applications, high availability solutions such as Continuent uni/cluster are increasingly important," said Mårten Mickos, senior vice president, Database Group, Sun Microsystems. "Continuent uni/cluster addresses what many enterprises need - a cost-effective, reliable way to ensure that MySQL database applications are available 24/7."

"With Continuent uni/cluster 2008, organizations have insurance against outgrowing the capacity of their system," said Eero Teerikorpi, CEO of Continuent. "They can add new database servers on the fly and take advantage of uni/cluster's highly efficient load balancing, where database activity is directed to the least busy server. This can be vital to maintaining continuous data availability for maximum productivity and meet customer expectations."

At the conference, Continuent will be exhibiting its Continuent uni/cluster for MySQL in booth #101, and educating attendees on how to build highly available, scalable online database applications with MySQL

Robert Hodges, CTO at Continuent, will be delivering two talks at the conference. His first talk titled "Continuent Tungsten: Proxies on Steroids for HA and Performance!" on Tuesday, April 15, demonstrates how Continuent's new architecture rides new technology trends to create data services with high availability and performance using commodity hardware and off-the-shelf MySQL databases. His second talk "Portable Scale-Out Benchmarks for MySQL" on Wednesday, April 16, presents new open source tools that allow users to set up and run database scale-out benchmarks easily.

For more information about Continuent products, visit http://www.continuent.com. For information on Continuent's involvement in the open source community, visit http://www.continuent.org. Learn more about MySQL Conference & Expo by visiting http://mysqlconf.com.

About Continuent
Continuent provides continuous data availability. Continuent develops and markets commercial Continuent uni/cluster products and services based on Sequoia, a database-neutral, open source database-clustering project (www.continuent.org). Continuent's commercial open source solutions are currently available for EnterpriseDB™, MySQL and PostgreSQL. Continuent's Sequoia open source solutions are available for Microsoft® SQL Server, Oracle®, IBM® DB2®, and Sybase®. Continuent is headquartered in San Jose, CA, with research labs in Finland and France. For more information, please visit www.continuent.com.

Source: PRWeb

Saturday, April 12, 2008

8 Essential MySQL Queries

Here's a list of queries that I found myself using very often and that save me a lot of development time. I hope you can benefit from them as well.

1. Create a quick backup

Before testing a new piece of code you suspect might mess up data in one or more tables it's always a good practice to create a backup. To quickly create a backup copy of a table, use this query:

CREATE TABLE backup SELECT * FROM TABLE original;

The query creates a table backup which is a copy of the original table and includes both structure and content.

2. Create/change/restore a password

Many applications store MD5-crypted passwords in the database. If you want to quickly create a new MD5-ed password, or you have forgotten your password, use the following query to get a new one:

SELECT MD5('somepasshere');

This statement will give you "b5bab206cc8002bf7c10d47b24a2d0e6" which is the encrypted version of the string "somepasshere". There are other function that crypt stings in MySQL using different algorithms, most notably

PASSWORD()
which is using MySQL's own crypting algorithm.

3. Working with Unix timestamps

To convert from human-readable MySQL date/time format into Unix timestamp, use: SELECT UNIX_TIMESTAMP(); Without parameters, this will give you the timestamp of the current date and time. With parameters, you can get timestamp for any date. For example: SELECT UNIX_TIMESTAMP('2006-12-31'); This statement gives you the timestamp 1167541200. To get a date back from a timestamp, use: SELECT FROM_UNIXTIME(1167541200); This results in "2006-12-31 00:00:00"

4. Quick increment

To increment an integer stored in a table (useful for stats for example), use: UPDATE sometable SET counter=counter+1 WHERE …; Here "counter" is the name of the field that stores the integer value.

5. Toggle a value

If you have a field that stores a Boolean type of value, like 0/1 or yes/no, you can easily toggle the value with one if-statement:

UPDATE sometable SET flag=(IF(flag='no','yes','no'));

6. Find/replace

Say you want to update a piece of text if all records in a table field. REPLACE() comes to the rescue:

UPDATE sometable SET field = REPLACE(field, 'black','white');

This statement will replace all occurrences of the string "black" with the string "white" in all records of the "field" column. Apart from the string "white" the rest of the text contained in the field will be left as is.

7. Get a random record

If you want to select a random row in your table, you can use the statement:

SELECT * FROM table ORDER BY RAND();

8. Upper/lower case

If you want to modify a value and make it upper or lowercase, use the UPPER or LOWER functions, like this:

SELECT LOWER("Value"); // gives you "value"

SELECT UPPER("Value"); // gives you "VALUE"

About the Author
Stoyan Stefanov is a web developer from Montreal, Canada, Zend Certified Engineer, book author and contributor to the international PHP community. His personal blog is at http://www.phpied.com.

How to Create a MySQL Database

Whether you are an experienced web programmer or a complete novice attempting to provide data interactivity with your web site, MyQSL is an easy to use and free database solution that can allow you to store and configure data to be displayed on your web site.

The best way to create and manage a MySQL database is to download an open source (free) program called PhpMyAdmin. PHPMyAdmin allows you to manage all aspects of both your database structure and data from one easy to use interface. This tool is intended to handle the administration of MySQL over the Web.

This tool provides an interface that allows you to create and drop databases, create, drop, or alter tables, delete, edit, or add fields, execute any SQL statement, manage keys on fields, manage privileges, and import and export data into various formats. That sounds like a complicated set of activities, but the easy to use graphical tools make things quite simple and easy to understand. If you make a mistake, the software even provides instructions on where you made your error.

For a complete demo see: http://www.phpmyadmin.net/phpMyAdmin/
For documentation visit: http://www.phpmyadmin.net/home_page/docs.php

Most Linux based web hosting companies provide PhpMyAdmin as a standard feature with their packages. It is also available in a “Windows” IIS version. If your hosting provider does not already have this product installed they will often install it for you, or even allow you to install it yourself. Setup is quick and easy if you follow the step-by-step installation documentation.

Step One: Creating your new database

When you log in to your PhpMyAdmin welcome page, the first step is to enter a name for your new database in a text box provided. You can name your database anything that you wish, however if you are creating the database to use with a script or software package that you purchased somewhere, the script provider will often suggest a “preferred” database name. You should always create your database using the following format:

username_ databasename
Example: myusername_mydatabase

Your complete database name should always begin with your username followed by an underscore, then followed by the database name. This allows the server to know which user is in control of the new database, and it will also provide permission to access the database to only specific users. This also allows different users on the same server to use the same name for their own database, as you did, without interfering with your data – that is helpful if more than one user on your server bought similar software for their own site. They can then also use the software providers “preferred” database name.

Step Two: Creating a table for your new database

After you have created a database, the next step is to create a table, or even multiple tables, for you to store data. A table is the part of your new database that actually stores data.

You create a table by selecting the database that you created from the drop box list of databases. Once a database is selected a new form appears and asks for you to create a new table.

You must decide what you want to name your table and enter that name into the name box. Try to choose a name that reflects the type of data that will be stored in the table, such as orders, users, or inventory.

You then must decide how many “fields” or columns of data that you want to store for each record. If you need for the table to store five (5) different items, such as username, users email address, users telephone number, users account number, and the users age, than you would need five (5) fields. Simply enter the number 5 in the appropriate box. Once you hit create, the system will create a table and will add those fields into the table for you. Don’t worry about the number of fields you might need right now, as you can always add or delete fields later.

Step Three: Defining Fields

Once you have created your table you will be prompted to tell the database what features that you want each field to have. This looks complicated, but it’s not if you select your data type from the information below. You basically have to decide between three common data types and select the best choice for storing your data. If you make a mistake you can go back and edit the field.

If the field is to be used to store numbers, here are some choices:

TINYINT – A very small integer. The signed range is -128 to 127.
SMALLINT - A small integer. The signed range is -32768 to 32767.
MEDIUMINT - A medium-size integer. The signed range is -8388608 to 8388607.
INT - A normal-size integer. The signed range is -2147483648 to 2147483647.
BIGINT – A very large integer.

Some other less common number options include:

FLOAT- A floating-point number.
DOUBLE – A double-precision floating-point number.
DECIMAL - A packed exact fixed-point number.

If the field is to be used to store text or both text and numbers combined, here are some choices:

VARCHAR is for varying characters and can be up to 255 characters in length.
TEXT is a column with a maximum length of 65,535 characters – easy to search.
BLOB is a column with a maximum length of 65,535 characters – case-sensitive.

If the field is to be used to store dates, here are some choices:

DATE - A date.
DATETIME - date and time combination.
TIMESTAMP - useful for recording the date and time of an INSERT or UPDATE operation.
TIME - A time.

Once you have selected the data type for your fileds you will need to let the system know how many characters that you will need to store in the field.

Example: if you are storing a username, you might want to select VARCHAR as your data type and allow up to 100 characters for that field. If you are creating a User Identification number you might want to select INT and allow up to six characters – that would allow you to have up to 999,999 users.

The last step to creating your data fields is to select any special attributes that you may find helpful. Some examples are:

Auto Increment: Auto-Increment fields are useful for assigning unique identification numbers for users, products, and customers, etc. By default, fields are incremented using number characters (like "1", "2").

Primary Key: The primary key is a data column that uniquely identifies a specific instance of that data. At least one of your fields must be a Primary Key. Username is an example of a good primary key. You do not want to have more than one individual having the same username.

Index Key: Allows you to speed up searches by designating a field as a preferred data source, especially when combining data from multiple tables.

Congratulations, once you have completed these steps you are ready to import data into your new database.

About the Author
Don Beavers lives in Bryan/College Station, Texas and is an enterprise level PHP-MySQL programmer at both the Shopping Elf Shopping Guide and the Datavor Web Directory.

Monday, March 17, 2008

Embarcadero Releases New Eclipse SQL Development Tool

Following on its recent series of announcements of key hires from the Eclipse community, Embarcadero is debuting its new professional-grade SQL development tool, PowerSQL, today at EclipseCon 2008. PowerSQL dramatically improves productivity for Eclipse application developers charged with SQL development.

"With the growing sophistication of J2EE, Ruby on Rails and other development frameworks increasingly dependent on databases, application developers require more depth in knowledge and tooling for the underlying DBMS technologies," said Greg Keller, vice president of product management, Embarcadero Technologies. "PowerSQL brings developers what they expect in an IDE with tremendous depth equaling hundreds of man-years worth of experience in database SQL parsing, connection, debugging and general optimization to produce high-performance SQL."

Embarcadero PowerSQL, the company's fourth tool built on the Eclipse framework, is a SQL IDE (Integrated Development Environment) that can be installed as a standalone application (Eclipse RCP) or as an Eclipse plug-in. It offers native support for Oracle, Microsoft SQL Server, Sybase and DB2 for LUW, as well as JBDC support for other prominent DBMSs such as MySQL. PowerSQL runs on both Windows and Linux operating systems. Its flexibility and compatibility, in addition to a low price-point, make it a must-have tool for application developers who are increasingly working with databases.

"We are seeing an upsurge in the number of traditional developers who are taking on more database work and using SQL on a somewhat regular basis," said John F. Andrews, president and CEO of Evans Data Corporation. "In fact, according to research we conducted in September 2007, SQL is the second most popular language among Eclipse users, with 64 percent using it at least some of the time."

Features of the new Embarcadero PowerSQL tool include:
• SQL Code Assist ensures 100% object name accuracy, even when not connected to a database, plus real-time SQL syntax validation
• SQL Project Insight provides project-level SQL file cataloging and search features to help streamline project organization and maintenance
• Migration Wizard imports data sources from Eclipse DTP (Data Tools Project) or Quest TOAD
• Data Source Explorer enables users to easily navigate, search, extract DDL, execute commands, and even browse an outline view without opening the SQL file
• Formatting Profiles ensure consistent, quality code layout for easy review and extension. Profiles can be customized and shared.

"Embarcadero continues to deliver on its commitment to Eclipse," said Mike Milinkovich, executive director, Eclipse Foundation. "By bringing new Eclipse-based tools to market like PowerSQL, more developers are able to experience the many benefits offered by Eclipse. Embarcadero is a great example of a company that is providing innovative solutions to the Eclipse community."

Pricing and Availability
Embarcadero PowerSQL is now available in three versions worldwide: Personal, Standard and Professional. North American pricing for Personal Edition begins with annual subscription-based options as low as $8.25 per month per developer. Embarcadero PowerSQL can be purchased online at www.embarcadero.com/store. For more information, visit www.embarcadero.com/products/powersql.

About Embarcadero Technologies
Embarcadero Technologies, Inc. delivers professional grade database tools that companies use to design, develop and manage databases and the data they contain. More than 12,000 customers worldwide and over 90 of the Fortune 100 rely on Embarcadero's cross-platform tools to reduce complexity, improve productivity and strengthen security. The company's flagship database tools include: ER/Studio, DBArtisan, Rapid SQL and Change Manager. Founded in 1993, Embarcadero Technologies is headquartered in San Francisco with offices in Melbourne, Australia, Munich, Germany and Maidenhead, United Kingdom. For more information, visit www.embarcadero.com.

Embarcadero, the Embarcadero Technologies logos and all other Embarcadero Technologies product or service names are trademarks or registered trademarks of Embarcadero Technologies, Inc. All other trademarks are property of their respective owners.

Source: PRWeb

Sunday, March 16, 2008

Improve The Performance Of Your MySQL Server

MySQL is a rock solid, lighting fast database server which has been designed for two factors speed and performance. It is the Ferrari of databases: Light weight, fast and Built for the high speed tracks!

I still hear an awful lot of stories from owners whose databases are running two slow. In my experience, the three main places to look for problems are:

1. Faulty Database Design
2. Bad Queries
3. Server factors

Faulty Database Design
Proper database design is the single most important factor for the ensuring performance and maintainability of the database. Here is what you need to answer when designing a table: Can I reduce the size of data that each row will have? Here is what you can do:

1. Use unsigned numeric values when the application will not store negative numbers. Like the “quantity ordered” of an item in an ecommerce application is never going to be -$125.

2. Use Variable length values instead of fixed length value i.e. used varchar instead of char.

3. Do not use unnecessarily large field sizes. For most ecommerce application “unsigned smallint” is more than enough to store inventory count. A field described as “unsigned smallint” can store a max value of 65535.

4. Don’t ignore normalization; its helps prevent unnecessary repetition of data. The part B of this is, don’t overuse normalization. If the table will not grow in size significantly, there is no point in normalization. For example, if the user table has just 20 rows (i.e. 20 employees in a company), all attempts of normalization are wasted.

5. Use Keys. Don’t decide keys by “The customer id has to be indexed in the order table”. If the order table is being searched 90% of the times by “order date”, it makes more sense to index “order date”.

Remember, how a table will be used should determine how it is designed. Spending time here will save years of frustration.

Bad Queries
It sounds too good to be true but you wont believe the number of developers out there who completely suck at writing queries. There are two types of bad queries:

a) Unnecessary Queries: These are the queries that shouldn’t have been made in the first place. The only way to avoid this is asking, “Do I really need this data?”

b) Inefficient Queries: These are the queries that do not use the underlying table structure or MySQL functions in the correct way.

Here is a starting point to start looking at problem areas:

1. Unnecessary usage of “Select * “statements when the entire processing is being done on a single column. The more data is fetched from the server the more work MySQL has to do and more bandwidth it takes.

2. Using sub-query instead of a join. On a properly designed database, joins are incredibly fast. Using sub-queries just shows a lack of knowledge.

3. Improper use of Keys. This is especially valid for range checks. Remember to use the “Explain” statement to check the usage of keys and then use the “use key” statement in your “where” clauses to force key usage.

Server Factors
Everything done correctly, there still may be some server factors that may be causing the system to be slow. These are:

1. Hardware related
2. Server configuration related

Here is what you can do about the hardware:

1. The more RAM is on the system the better it is. MySQL frequently fetches data from the RAM and more the RAM is on the system, the better it is.

2. Buy the fastest possible RAM! A slower RAM is just irony.

3. Once you are settled with the RAM size and speed, look for processing speed. MySQL can use multiple processors.

Once you are satisfied with the hardware, there are a set of variables in “my.cnf” that you must look at:

a) key_buffer_size: This describes the memory available to store the index keys. The default is 8 MB but you can set it to 25% of the RAM.

b) query_cache_size: This value is by default 0. if you have a lot of repeating queries like in reporting applications etc, make sure you set this value high.

c) table_open_cache: This determines the number of table descriptors that MySQL will keep in the cache. The default value is 64. But, if you have 100 users accessing a table concurrently then this value should atleast be 100. You also have to take into considerations joins etc. Thus, this value should also be kept high.

I hope this article will take one step further in unlocking the mystery of slow servers and help solve some of the problems.

About Author:
Mukul Gupta is the CMO of Indus Net Technologies, an India based Internet Consulting firm which specializes in Opensource solutions. You can reach him at script@script2please.com or visit http://www.script2please.com

Saturday, March 1, 2008

How to Install MySQL on Windows 2003

For this tutorial we are going to download and install MySQL on a Windows 2003 server. While there are many options in the installation, most of them are outside the scope of this tutorial. Here, our goal is to get MySQL running on your server so you can go on to use it as your database for other web applications.

Tuesday, February 26, 2008

Backing Up And Restoring Your MySQL Database

If you've been using MySQL database to store your important data, it is imperative that you make a backup of your data to prevent any loss of data. This article shows you how to backup and restore data in your MySQL database. This process can also be used if you have to move your data to a new server.

Backing up your database
The quickest and easiest way to backup and restore your database would be to use MySQLDump. If you've got shell or telnet access to your server, you can backup MySQL data by issuing the mysqldump command. The syntax for the command is as follows.

mysqldump -u [uname] -p [pass] [dbname] > [backupfile.sql]

[uname] - this is your database username
[pass]- this is the password for your database
[dbname] - the name of your database
[backupfile.sql] - the filename for your database backup

To backup your database 'Customers' with the username 'sadmin' and password 'pass21' to a file custback.sql, you would issue the command
mysqldump -u sadmin -p pass21 Customers > custback.sql

Issuing this command will backup the database to custback.sql. This file can be copied to a safe location or a backup media and stored. For more information on MySQLDump, you can check out : http://www.mysql.com/doc/en/mysqldump.html

Restoring your database
If you have to re-build your database from scratch, you can easily restore the mysqldump file by issuing the following command. This method will not work if the tables already exist in your database.
mysql - u sadmin -p pass21 Customers < custback.sql

If you need to restore existing databases, you'll need to use MySQLImport. The syntax for mysqlimport is
mysqlimport [options] database textfile1

To restore your previously created custback.sql dump back to your Customers Database, you'd issue
mysqlimport -u sadmin -p pass21 Customers custback.sql

For more information on MySQLImport, you can check out : http://www.mysql.com/doc/en/mysqlimport.html

About The Author
Vinu Thomas is a consultant on Webdesign and Internet Technologies. His website is http://www.vinuthomas.com. You can discuss about this article or any PHP/MYSQL related issues in our Discussion Forums: http://www.vinuthomas.com/forum2.html

Thursday, December 6, 2007

Continuent Announces Database Performance Test Tool

Continuent, Inc., the leading provider of commercial open source middleware solutions for database high-availability and scalability, today announced the release of Bristlecone, a new open source framework for load testing of databases and database clusters.

Bristlecone includes two easy-to-run tools designed for comparative evaluations of database performance:

  • Evaluator generates mixed loads of inserts, updates, deletes, and selects. Output can be built-in graphics, HTML, XML, or CSV.
  • Benchmark runs performance test cases with systematically varying parameters. Output can be HTML or CSV.

Bristlecone includes support for multi-threaded tests, can generate new tests quickly with simple configuration file changes, and has the ability to perform systematic tests across different database implementations. Bristlecone has been tested against PostgreSQL, MySQL®, and HSQLDB.

"Bristlecone is the principle load-testing tool for Continuent's uni/cluster, a commercial database clustering product based on the Sequoia open source project," says Robert Hodges, CTO at Continuent. "Bristlecone is a great tool because it can work easily with many types of databases. We are also working with the open source community as well as advanced clustering research projects like GORDA to develop off-the-shelf benchmarks of database clusters that anyone can set up and run quickly in their own environments."

Bristlecone is available at http://bristlecone.continuent.org

For more information about Continuent products, visit http://www.continuent.com For information on Continuent's involvement in the open source community, visit http://www.continuent.org

About Continuent
Continuent provides continuous data availability. Continuent develops and markets commercial Continuent uni/cluster products and services based on Sequoia, a database-neutral, open source database-clustering project (www.continuent.org). Continuent's commercial open source solutions are currently available for EnterpriseDB™, MySQL and PostgreSQL. Continuent's Sequoia open source solutions are available for Microsoft® SQL Server, Oracle®, IBM® DB2®, and Sybase®. Continuent is headquartered in San Jose, CA, with research labs in Finland and France. For more information, please visit www.continuent.com.

Source: PRWeb

Tuesday, October 23, 2007

Performance Tuning Best Practices for MySQL


Learn where to best focus your attention when tuning the performance of your applications and database servers, and how to effectively find the "low hanging fruit" on the tree of bottlenecks.

Saturday, October 20, 2007

AquaFold Releases Enterprise Sybase, MS SQL, Oracle, Server Database Administration Tools for Windows, Linux and OSX

AquaFold, Inc. has released Aqua Data Studio 6.5, a powerful upgrade to its already versatile, multi-platform application that provides complete database administration and query tools for Oracle, DB2, Microsoft SQL Server, MySQL, Sybase, Informix, and PostgreSQL on Linux, OSX and Windows. Within this single application, database managers can save time and money in the design, development and maintenance of enterprise relational databases.

Version 6.5 includes new Source Control Support for Subversion and CVS. With Source Control, multiple users can store, check in and update scripts and other files from within Aqua Data Studio, eliminating the need for other versioning software. This will free system memory, and create a more efficient server update process. ADS also now has a SQL Debugger for Sybase and Oracle which allows users to locate and eliminate problems in SQL statements, eliminating the rigorous searching usually required to locate and correct errors in Sybase and Oracle.

One of the most powerful new features added to the Query Analyzer is its Excel supported Grids, Pivot Grids and Graphs/Charts which allow the grouping and summarizing of selected columns and rows of data into reports. Pivot Grids and Graphs display on multi-level split-panes which allow full control over size configurations persisting over multiple runs of the same query in the same query panel. Their configurations are saveable and reloadable into existing pivot tables for quick and efficient access later. The results can be visualized in three dimensional, fully rotatable graphs, and can be exported directly to, and from, Excel.

Version 6.5 includes a complete set of enhancements for Schema, Directory and File difference tools, including Object Permissions, Filtering by File Size, Background Processing, Refresh, Data Compare, Save as HTML, Preview in Browser, Difference Count and, for File Diff, the ability to Drag & Drop files into the tool. There is also a new Results Difference tool which gives users the ability to view differences between two result sets obtained from either the same or two different queries. The Results Difference tool also allows users to view where columns and rows have been added or deleted and where cells have been edited in different result sets.

In addition, there is now support for auto-completion across multiple databases which allows users to complete a table in a database other than the one they are currently working in. Users can now share the autocompletion schema data across different query windows through the new Global Auto Completion Cache which increases speed by minimizing memory consumption. There are a variety of client side command enhancements which are supported by Query Analyzer scripts, and a new Morph to Delimited List which allows users to convert a block of text into a delimited list with the appropriate options for completing a query or other documentation.

Aqua Data Studio 6.5 is available for immediate download at http://www.aquafold.com/downloads.html A complete list of new features and descriptions may be viewed at http://www.aquafold.com/features_6_5.html The cost of a single-user commercial license is $399(USD). Multi-license purchase discounts are also available and can be viewed here http://aquafold.com/licensing.html

About AquaFold, Inc.
AquaFold, Inc. is a provider of software tools for relational databases. More than 300,000 users from over 90 different countries use AquaFold's products to design, develop and administer databases in Oracle and other popular programs. For more information visit http://www.aquafold.com

Source: PRWeb

Saturday, September 8, 2007

Continuent Ships uni/cluster Connector for PostgreSQL and MySQL

Continuent, Inc., the leading provider of commercial open source middleware solutions for database high-availability and scalability, today announced the Continuent uni/clsuter Connector.
Continuent uni/cluster is a suite of middleware software that delivers high-availability and scalability clustering for virtually any mission critical database application.

Continuent uni/cluster Connector is a key part of the Continuent vision of transparent database clustering using off-the-shelf databases and commodity hardware. The Connector allows applications that use MySQL's or PostgreSQL's native database APIs to connect directly to Continuent uni/cluster (uni/cluster for MySQL Enterprise, uni/cluster for PostgreSQL and uni/cluster for EnterpriseDB respectively) without changing libraries or making code alterations.

"Continuent uni/cluster Connector makes database clustering deployments simpler and faster -- customers can focus on deploying the cluster and just switch client connections when they are ready to move." says CTO Robert Hodges anc continues "Another great feature of the Connector is that standard database clients such as 'mysql' and 'psql' can work directly with the cluster. So users preserve not only current client applications but also can continue to use familiar administrative tools as well. Finally, the uni/cluster Connector is fast and consumes few system resources. It minimizes resource impact of deploying Continuent uni/cluster in new environments."

This version of uni/cluster Connector supports all API calls except for use of prepared statements. Continuent is working on these now and expect to provide support in the next release.

Continuent uni/cluster Connector is available in September 2007 and it is free for all Continuent uni/cluster customers. The pricing for Continuent uni/cluster starts at $3,600.

For more information about Continuent products, visit www.continuent.com, and for information on Continuent's involvement in the open source community, visit www.continuent.org.

About Continuent

Continuent increases application reliability by ensuring continuous database availability. Continuent manages a database-neutral, open source database-clustering project Sequoia (www.continuent.org). Continuent also develops and markets commercial Continuent uni/cluster products and services based on Sequoia technology

Continuent's commercial open source solutions are currently available for MySQL® (Continuent uni/cluster for MySQL Enterprise) and PostgreSQL (Continuent uni/cluster for PostgreSQL). Continuent's Sequoia open source solutions are available for Microsoft® SQL Server, Oracle®, IBM® DB2®, and Sybase.

Continuent clustering solutions are designed to provide high-availability and performance scalability services for databases. These solutions are applicable to, and can be transparently added to, a wide range of client/server and internet, especially Web 2.0 applications.

Continuent is headquartered in San Jose, CA, with sales offices in UK and Finland, and a research lab in France. For more information, please visit www.continuent.com.

Source: PRWeb

Thursday, August 2, 2007

Zmanda Delivers Powerful New Way to Manage MySQL Backups

Zmanda™, the leader in open source backup and data protection, today announced that its Zmanda Recovery Manager (ZRM) for MySQL is now available with the Zmanda Management Console - a set of powerful graphical tools designed to simplify and accelerate the complex process of MySQL database backup and recovery. ZRM with the Zmanda Management Console can dramatically reduce the workload of a MySQL database administrator (DBA) while providing enterprise-class, MySQL-specific backup and recovery.

"Backing up MySQL data is a business-critical task for DBAs at thousands of Web 2.0 companies and other data-driven enterprises," said Dmitri Joukovski, Zmanda's vice president of Product Management. "ZRM is the only comprehensive backup solution that addresses the unique needs of MySQL databases -- such as multiple database storage engines. The new graphical management console means secure, scalable enterprise-grade MySQL backup is more manageable than ever."

ZRM: Open Source Backup Solution Specifically for MySQLZmanda's ZRM for MySQL is the only comprehensive, enterprise-class backup and recovery solution designed specifically for MySQL databases. An open source solution, ZRM delivers robust backup and recovery functionality to help MySQL DBAs prevent the serious damage caused by data loss in the event of system or database failure.

ZRM is different from traditional backup solutions that simply provide an agent for MySQL as part of a more general, system-wide backup process. It features MySQL-specific functionality, such as storage engine awareness, to meet the enterprise-class requirements of the MySQL DBA.

The new version of ZRM includes a range of updates and additions to deliver added simplicity, security, flexibility and support:

  • Simplicity - Zmanda's new comprehensive Management Console for ZRM lets MySQL DBAs graphically explore MySQL database servers and choose which database and/or tables to back up. It also gives DBAs the power to choose where, when and how the backup will occur and to create detailed reports.
  • Security - ZRM allows DBAs to delegate responsibility and set specific privileges of MySQL databases within their database network.
  • Flexibility - Zmanda has added plug-in support to ZRM for MySQL, allowing partners and DBAs to create their own plug-ins to drive snapshot mechanisms.
  • 24/7 Enterprise-Class Support - For those customers who need the extra level of support, Zmanda has now offers round-the-clock, 24 x 7 Premium support.

"As the role of the DBA has become more complex, simplifying critical ongoing operational processes like data backup have become increasingly important," said Robin Schumacher, MySQL's director of Product Management. "Zmanda's ZRM with the new management console can make backing up MySQL data much easier, giving DBAs the peace of mind that their MySQL data is protected, even in demanding production environments."

Pricing and Availability
Zmanda's Management Console for MySQL Backup is available today through a paid subscription to the Zmanda Network, a cost-effective service that offers everything businesses need to successfully deploy low cost, enterprise-grade backup solutions.

For enterprise use, Zmanda offers three Zmanda Network subscription levels that include a range of premium-level software, support and services. For community users, Zmanda Network includes a free-of-charge subscription level that provides access to resources such as whitepapers, tutorials, and community forums. For additional details on ZRM for MySQL, please go to http://www.zmanda.com/zrm-mysql-enterprise.html

About Zmanda
Zmanda was founded in 2005 to bring the benefits of open source software to the critical operational task of data protection through backup and recovery. The company's flagship offering is the Zmanda Network, a suite of software and services for enterprise data backup and recovery. Zmanda Network offers a network backup solution based on Amanda, the world's most popular open source data backup and recovery technology, as well as an application-specific backup solution, ZRM for MySQL. Zmanda's corporate leadership includes technology veterans with broad experience in enterprise storage and open source software. The company's headquarters are located in Sunnyvale, California. For more information about Zmanda, please go to http://www.zmanda.com/.

Zmanda is a trademark of Zmanda Incorporated in the USA. Other products mentioned may be trademarks of their respective corporations.

Source: PRWeb

Friday, July 20, 2007

Minq Software Ships DbVisualizer 6.0

Minq Software today announced the general availability of DbVisualizer 6.0, a world leading, cost effective, cross platform database tool that increases user productivity by providing a single solution to speed development, testing and administration of relational databases. DbVisualizer offers a robust set of features to assist database developers and DBAs perform tasks such as object browsing, creating, running SQL statements and SQL scripts, viewing and editing data. Additionally, this tool includes features such as a the powerful table references graph, query builder, SQL formatter, result set charting and SQL bookmarks feature.

DbVisualizer supports all major commercial databases including Oracle, DB2, Mimer, SQL Server, Sybase ASE, Informix and open source alternatives such as MySQL, PostgreSQL and JavaDB/Derby. DbVisualizer is optimized for the Windows XP, Mac OS X and Linux/UNIX operating systems.

The new release adds the Table Data Navigator which is powerful tool to navigate foreign keys based on data selections. This is useful when browsing normalized tables with keys to other tables, click an entry in one table, choose the link to follow and the target table will be displayed with the matching data. The new Table Editor supports visual creation and editing of table definitions including columns, indexes, primary, foreign keys, constraints and non standard features specifically for the supported databases. The Data Editor is a central feature that has been revised from ground up, and now supports multiple row operations, transaction control, easy copy/paste with the most popular spreadsheet applications, enhanced filtering, sorting and printing. In addition, this new version is optimized for Windows Vista, DB2 version 9, Java 1.6 and comes with an option to install JDBC drivers for MySQL, PostgreSQL, Sybase, SQL Server, DB2, Mimer and JavaDB/Derby.

"The new features and changes are sweeping and I think we've done a great job putting it all together, still keeping the tool focused and consistent", says Roger Bjärevall, product manager for DbVisualizer at Minq Software.

Availability and Pricing
DbVisualizer is available in two editions, DbVisualizer Free and the commercial DbVisualizer Personal edition starting at $149 per user.

For more information, visit http://www.dbvis.com

About Minq Software
Minq Software is a Swedish software company developing, marketing and selling database software, performance assurance and response time monitoring products. Founded in 1998, it has been a successful provider of load testing and database solutions.

Source: PRWeb

Monday, June 4, 2007

COEUM Software Announces MySQL Performance Health Check

Expanding the offerings of it's product and service portfolio, COEUM Software, a leading provider of database tuning and performance solutions, today announced the immediate availability of COEUM Performance Health Check for MySQL.

"The world of customer centric computing today has rapidly moved to a non stop, 7 X Forever endeavor. As the world economy continues to integrate, successful customer centric companies are looking for product and service solutions that provide maximum scalability and reliability for their customer facing mission critical applications. In support of this, we believe it is critically important to provide knowledge and best practice services in support of the most demanding scaled-out database environments" said Dale Royal CEO of COEUM Software.

"Every MySQL database, whether it be Open Source or Enterprise Edition, needs constant maintenance to ensure it will continue to run healthily and meet the changing needs of a business. This essential performance assessment service addresses the fundamentals of availability, manageability and affordability for the non-stop world," stated Alan Bitterman, CTO of COEUM Software.

Available for MySQL Open Source implementations as well as MySQL Enterprise versions, COEUM Performance Health Check provides a consistent disciplined methodology of analysis and assessment services designed to deliver optimum performance at an affordable rate. With entry level assessments starting at $500 USD, COEUM Performance Health Check can be scaled to meet the most demanding environments, thus ensuring peace of mind for the most mission critical applications of today and into the future.

About COEUM Software
COEUM software provides solutions that target and optimize database applications in the new world economy. It's advanced monitoring and tuning solution delivers the functional expertise of highly trained and experienced administrators in an automated fashion, thereby providing optimized application performance with out additional personnel expense burden. For more information on COEUM Software's product and service offering, please visit http://www.coeum.com/.

COEUM, COEUM Software, COEUM for MySQL are trademarks of COEUM Software. MySQL is a registered trademark of MySQL AB in the U.S. and in other countries. Other company and product names may be trademarks of the respective companies with which they are associated.

Source: PRWeb

Tuesday, March 27, 2007

Easy CGI Upgrades to MySQL 5.0.27

Easy CGI, a leading Windows web hosting provider, recently upgraded its supported version of MySQL, the world's most popular open source database. Easy CGI now supports MySQL 5.0.27.

The MySQL database has become the world's most popular open source database because of its superior performance, high reliability and ease of use. Easy CGI has upgraded to MySQL 5.0.27 because of it offers new features such as an information schema view, new triggers and advanced stored procedures.

"MySQL 5.0.27 offers a more efficient and stable database," says Dan Richfield of Easy CGI. "With this upgrade to version 5.0.27, we continue to provide our loyal customers with a host service that is comprehensive and dependable."

About MySQL
MySQL AB develops and markets a family of high performance, affordable database servers and tools. The company's flagship product is MySQL, the world's most popular open source database, with more than 4 million active installations. Many of the world's largest organizations, including Yahoo!, Sabre Holdings, Cox Communications, The Associated Press and NASA, are realizing significant cost savings by using MySQL to power Web sites, business-critical enterprise applications and packaged software. MySQL AB is a second generation open source company, with dual licensing that supports open source values and methodology in a profitable, sustainable business. For more information about MySQL, please go to http://www.mysql.com.

About Easy CGI, Inc.
Easy CGI has been on the leading edge of the web hosting industry since 1994. Offering superior technology, cost effective, efficient solutions and exceptional customer service, Easy CGI's vision has made it the clear choice for over a decade. Additional news and information about the company is available at www.easycgi.com.

Sunday, March 11, 2007

Pagination with PHP and MySQL

Pagination, as described in the video, is the process of breaking a bunch of results, from a MySQL Query, up into specific pages, which themselves list a set number of items each.