Learning MySQL

Learning MySQL

Hugh E. Williams, Seyed M.M. Tahaghoghi

Language: English

Pages: 622

ISBN: B004LRPBCK

Format: PDF / Kindle (mobi) / ePub


Whether you're running a business, keeping track of members andmeetings for a club, or just trying to organize a large and diversecollection of information, you'll find the MySQL database engineuseful for answering questions such as:

  • Which are my top ten fastest-selling products?
  • How frequently does this person come to our facility?
  • What was the highest, lowest, and average score of the team last season?

MySQL, the most popular open-source database, offers the power ofa relational database in a package that's easy to set up andadminister, and Learning MySQL provides all the tools you need toget started. This densely packed tutorial includes detailedinstructions to help you set up and design an effective database,create powerful queries using SQL, configure MySQL for improvedsecurity, and squeeze information out of your data.

After covering the basics, the book travels far into MySQL'ssubtleties, including complex queries and joins, how to interact withthe database over the Web using PHP or Perl, and importanthouse-keeping such as backups and security.

Topic include:

  • Installation on Linux, Windows, and Mac OS X
  • Basic and advanced querying using SQL
  • User management and security
  • Backups and recovery
  • Tuning for improved efficiency
  • Developing command-line and web database applications using thePHP and Perl programming languages

The authors, Saied Tahaghoghi and Hugh E. Williams, have careers inacademia and business, and share a keen interest in research intosearch technologies.

Whether you've never touched a database or have already completedsome MySQL projects, you'll find insights in Learning MySQLthat will last a career.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

privileges and the stored password are different for each username and host pair: mysql> SHOW GRANTS FOR 'ali'@'sadri.invyhome.com'; +--------------------------------------------------------------------+ | Grants for ali@sadri.invyhome.com | +--------------------------------------------------------------------+ | GRANT USAGE ON *.* TO 'ali'@'sadri.invyhome.com' | | IDENTIFIED BY PASSWORD '*5DC1D11F45824A9DD613961F05C1EC1E7A1601AA' | | GRANT ALL PRIVILEGES ON `test`.* TO

input to the stored string; if the stored string isn’t already hashed, these won’t match, and the server will refuse access. You can also use the mysqladmin password command to change your own password from the command line. For example, you can change the password for the user your_mysql_username from your_old_mysql_password to your new mysql password by typing: $ mysqladmin \ --user=your_mysql_username \ --password=your_old_mysql_password \ password "your new mysql password" Notice that

AUTO_INCREMENT wasn’t used by the most recent query. int mysqli_affected_rows(resource connection) Reports the number of rows that were modified by the last query on the connection identified by the resource handle connection. We describe this function in more detail later in Finding the Number of Changed Rows Using mysql_affected_rows and mysqli_affected_rows.” int mysqli_num_rows(resource result) Reports the number of rows returned by a SELECT query identified by a result resource

CGI Module The Perl CGI module has some helpful functions to simplify generating common snippets of HTML. We can enable all these by modifying our use statement to: use CGI ':all' We can then generate HTML elements by calling the corresponding function. For example, we can include text within a level-one heading tag pair (

text

) by writing h1("text"). Many of these functions take attributes that are reflected in the generated HTML. For example, to generate the tag

ask whether customers are allowed to have more than one email address; if they are, we should model the email address as a separate entity. Is the object often nonexistent or unknown? If so, it is effectively an attribute of only some of the entities, and it would be better to model it as a separate entity rather than as an attribute that is often empty. Consider a simple example: to store student grades for different courses, we could have an attribute for the student’s grade in every

Download sample

Download