From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.43) id 1E7wXH-0000bn-Bk for garchives@archives.gentoo.org; Wed, 24 Aug 2005 14:47:27 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.4/8.13.4) with SMTP id j7OEkC1D026435; Wed, 24 Aug 2005 14:46:12 GMT Received: from smtp.gentoo.org (smtp.gentoo.org [134.68.220.30]) by robin.gentoo.org (8.13.4/8.13.4) with ESMTP id j7OEkBtx018394 for ; Wed, 24 Aug 2005 14:46:11 GMT Message-Id: <200508241446.j7OEkBtx018394@robin.gentoo.org> Received: from lark.gentoo.osuosl.org ([140.211.166.177] helo=lark.gentoo.org) by smtp.gentoo.org with smtp (Exim 4.43) id 1E7wX3-0005GS-Vv for gentoo-doc-cvs@lists.gentoo.org; Wed, 24 Aug 2005 14:47:14 +0000 Received: by lark.gentoo.org (sSMTP sendmail emulation); Wed, 24 Aug 2005 14:47:01 +0000 From: "Xavier Neys" Date: Wed, 24 Aug 2005 14:47:01 +0000 To: gentoo-doc-cvs@lists.gentoo.org Subject: [gentoo-doc-cvs] cvs commit: mysql-howto.xml Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-doc-cvs@gentoo.org Reply-to: docs-team@lists.gentoo.org X-Archives-Salt: d4511eda-f179-4f7c-8410-b2d63762d615 X-Archives-Hash: 843f497d8e4356f3489d4aaad80d2ea1 neysx 05/08/24 14:47:01 Modified: xml/htdocs/doc/en/draft mysql-howto.xml Log: More info about insert into, typo fixes, coding style... Revision Changes Path 1.2 +134 -141 xml/htdocs/doc/en/draft/mysql-howto.xml file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/draft/mysql-howto.xml?rev=1.2&content-type=text/x-cvsweb-markup&cvsroot=gentoo plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/draft/mysql-howto.xml?rev=1.2&content-type=text/plain&cvsroot=gentoo diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/draft/mysql-howto.xml.diff?r1=1.1&r2=1.2&cvsroot=gentoo Index: mysql-howto.xml =================================================================== RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/draft/mysql-howto.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- mysql-howto.xml 24 Aug 2005 11:51:02 -0000 1.1 +++ mysql-howto.xml 24 Aug 2005 14:47:01 -0000 1.2 @@ -1,8 +1,8 @@ - - + + - + MySQL Startup Guide @@ -11,9 +11,12 @@ Shyam Mani + + Xavier Neys + -This document helps a user setup and use MySQL. +This document helps a user set up and use MySQL. @@ -32,10 +35,10 @@

MySQL is a popular database server that is used in various applications. SQL stands for (S)tandard (Q)uery (L)anguage, which is what MySQL uses to -communicate with other programs. On top of that, MySQL has its own expanded -SQL functions to provide additional functionality to users. In this document, -we'll look at how to do the initial MySQL installation, setup databases and -tables and create new users. Let's start out with the installation. +communicate with other programs. On top of that, MySQL has its own expanded SQL +functions to provide additional functionality to users. In this document, we'll +look at how to do the initial MySQL installation, set up databases and tables, +and create new users. Let's start out with the installation.

@@ -72,9 +75,9 @@ ENTER when prompted while configuring the MySQL database. The configuration sets up the main MySQL database which contains administrative information such as databases, tables, users, permissions and more. The -configuration recommends that you change your root password as soon as possible. -We will definitely do this, otherwise someone could come along by chance and -hack our default setup MySQL server. +configuration recommends that you change your root password as soon as +possible. We will definitely do this, otherwise someone could come along by +chance and hack our default setup MySQL server.

@@ -108,11 +111,11 @@
 so as to keep this document as consistent as possible)
 
    * For security reasons you should set your MySQL root
-   * password as soon as possible.	   
+   * password as soon as possible.
 
-As of mysql-4.0.24-r2, passwords are entered during the config phase making +As of mysql-4.0.24-r2, passwords are entered during the config phase making root password entry more secure. @@ -124,7 +127,7 @@
 # /etc/init.d/mysql start
  * Re-caching dependency info (mtimes differ)...
- * Starting mysqld (/etc/mysql/my.cnf) ...        [ ok ] 
+ * Starting mysqld (/etc/mysql/my.cnf) ...        [ ok ]
 (Replace new-password with your desired password)
 # /usr/bin/mysqladmin -u root -h localhost password 'new-password'
 
@@ -165,7 +168,7 @@

-We have logged in and have a mysql prompt displayed. First let's take a look at +We have logged in and a mysql prompt is displayed. First let's take a look at the databases we currently have. To do so, we use the SHOW DATABASES command.

@@ -186,9 +189,9 @@

-Despite the fact that a test database is already created, we are going to create -our own. Databases are created using the CREATE DATABASE command. We'll -create one named "gentoo". +Despite the fact that a test database is already created, we are going to +create our own. Databases are created using the CREATE DATABASE command. +We'll create one named "gentoo".

@@ -218,12 +221,12 @@
 

-Indeed our database has been created. In order to work with creating tables -for our new gentoo database, we need to select it as our current database. -To do so, we use theUSE command. The USE command takes the -name of the database you wish to use as your current database. Another -option is to set it on the command line after the -p switch. Let's go -ahead and switch to the gentoo database. +Indeed our database has been created. In order to work with creating tables for +our new gentoo database, we need to select it as our current database. To do +so, we use the USE command. The USE command takes the name of the +database you wish to use as your current database. Another option is to set it +on the command line after the -p switch. Let's go ahead and switch to +the gentoo database.

@@ -244,15 +247,15 @@
 
 Working With Tables In MySQL
 
-Creating A Table +Creating a Table

In the structure of MySQL, there are databases, tables, records, and fields. Databases hold together tables, tables hold together records, records hold together fields, which contain the actual information. This structure lets -users select how they want to access their information. So far we've dealt -with databases, now let's work with tables. First off, tables can be listed +users select how they want to access their information. So far we've dealt with +databases, now let's work with tables. First off, tables can be listed similiarly to databases using the SHOW TABLES command. Right now there are no tables in our gentoo database, as running the command will show us:

@@ -265,8 +268,8 @@

This means we need to create some tables. In order to do so, we use the CREATE TABLE command. However, this command is quite different from -simple CREATE DATABASE command. This command takes a list of arguments -you must give it. The form is as follows: +simple CREATE DATABASE command. This command takes a list of arguments. +The form is as follows:

@@ -278,17 +281,17 @@
 let's make a table named developers. This table will contain the
 developer's name, email and job. field_name will contain the name of the
 field. We have 3 required names in this case: name, email, and job. The
-field_data_type is what type of information will be stored. The different
-formats avaliable can be found at the field_data_type is what type of information will be stored. The
+different formats available can be found at the MySQL Column Types
 Page. For our purposes, we'll use the VARCHAR data type for all of
-our fields. VARCHAR is one of the simplest of data types when it comes to
-working with strings. size is how much of data a single field will store
-of type field_data_type. In this case, we'll use 128 for our size. This
-means that the field can have VARCHAR data that is 128 bits. You can
-safely think of this as 128 characters for the time being, though there is a
-somewhat more technical explanation that the above site will provide you with.
-Now that we know how we are going to create the table, let's do it.
+our fields. VARCHAR is one of the simplest of data types when it comes
+to working with strings. size is how much of data a single field will
+store. In this case, we'll use 128. This means that the field can have
+VARCHAR data that is 128 bytes. You can safely think of this as 128
+characters for the time being, though there is a somewhat more technical
+explanation that the above site will provide you with. Now that we know how we
+are going to create the table, let's do it.
 

@@ -297,8 +300,8 @@
 

-Looks like our table was created ok. Let's check it with the SHOW -TABLES command: +Looks like our table was created ok. Let's check it with the SHOW TABLES +command:

@@ -312,10 +315,10 @@
 

-Yes, there's our table. However, it doesn't seem to have any information on -- gentoo-doc-cvs@gentoo.org mailing list