Gentoo Archives: gentoo-doc-cvs

From: Xavier Neys <neysx@×××××××××××.org>
To: gentoo-doc-cvs@l.g.o
Subject: [gentoo-doc-cvs] cvs commit: mysql-howto.xml
Date: Wed, 24 Aug 2005 14:47:27
Message-Id: 200508241446.j7OEkBtx018394@robin.gentoo.org
1 neysx 05/08/24 14:47:01
2
3 Modified: xml/htdocs/doc/en/draft mysql-howto.xml
4 Log:
5 More info about insert into, typo fixes, coding style...
6
7 Revision Changes Path
8 1.2 +134 -141 xml/htdocs/doc/en/draft/mysql-howto.xml
9
10 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
11 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
12 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
13
14 Index: mysql-howto.xml
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/draft/mysql-howto.xml,v
17 retrieving revision 1.1
18 retrieving revision 1.2
19 diff -u -r1.1 -r1.2
20 --- mysql-howto.xml 24 Aug 2005 11:51:02 -0000 1.1
21 +++ mysql-howto.xml 24 Aug 2005 14:47:01 -0000 1.2
22 @@ -1,8 +1,8 @@
23 <?xml version="1.0" encoding="UTF-8"?>
24 -<!DOCTYPE guide SYSTEM "http://www.gentoo.org/dtd/guide.dtd">
25 -<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/draft/mysql-howto.xml,v 1.1 2005/08/24 11:51:02 fox2mike Exp $ -->
26 +<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
27 +<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/draft/mysql-howto.xml,v 1.2 2005/08/24 14:47:01 neysx Exp $ -->
28
29 -<guide link="/doc/en/mysql-howto.xml">
30 +<guide link="/doc/en/draft/mysql-howto.xml"> <!--Remove draft/ when mv'ing up to /doc/en/ -->
31 <title>MySQL Startup Guide</title>
32
33 <author title="Author">
34 @@ -11,9 +11,12 @@
35 <author title="Editor">
36 <mail link="fox2mike@g.o">Shyam Mani</mail>
37 </author>
38 +<author title="Editor">
39 + <mail link="neysx@g.o">Xavier Neys</mail>
40 +</author>
41
42 <abstract>
43 -This document helps a user setup and use MySQL.
44 +This document helps a user set up and use MySQL.
45 </abstract>
46
47 <!-- The content of this document is licensed under the CC-BY-SA license -->
48 @@ -32,10 +35,10 @@
49 <p>
50 MySQL is a popular database server that is used in various applications. SQL
51 stands for (S)tandard (Q)uery (L)anguage, which is what MySQL uses to
52 -communicate with other programs. On top of that, MySQL has its own expanded
53 -SQL functions to provide additional functionality to users. In this document,
54 -we'll look at how to do the initial MySQL installation, setup databases and
55 -tables and create new users. Let's start out with the installation.
56 +communicate with other programs. On top of that, MySQL has its own expanded SQL
57 +functions to provide additional functionality to users. In this document, we'll
58 +look at how to do the initial MySQL installation, set up databases and tables,
59 +and create new users. Let's start out with the installation.
60 </p>
61
62 </body>
63 @@ -72,9 +75,9 @@
64 <c>ENTER</c> when prompted while configuring the MySQL database. The
65 configuration sets up the main MySQL database which contains administrative
66 information such as databases, tables, users, permissions and more. The
67 -configuration recommends that you change your root password as soon as possible.
68 -We will definitely do this, otherwise someone could come along by chance and
69 -hack our default setup MySQL server.
70 +configuration recommends that you change your root password as soon as
71 +possible. We will definitely do this, otherwise someone could come along by
72 +chance and hack our default setup MySQL server.
73 </p>
74
75 <pre caption="MySQL configuration">
76 @@ -108,11 +111,11 @@
77 so as to keep this document as consistent as possible)</comment>
78
79 * For security reasons you should set your MySQL root
80 - * password as soon as possible.
81 + * password as soon as possible.
82 </pre>
83
84 <impo>
85 -As of mysql-4.0.24-r2, passwords are entered during the config phase making
86 +As of mysql-4.0.24-r2, passwords are entered during the config phase making
87 root password entry more secure.
88 </impo>
89
90 @@ -124,7 +127,7 @@
91 <pre caption="Setting up your MySQL root password">
92 # <i>/etc/init.d/mysql start</i>
93 * Re-caching dependency info (mtimes differ)...
94 - * Starting mysqld (/etc/mysql/my.cnf) ... [ ok ]
95 + * Starting mysqld (/etc/mysql/my.cnf) ... [ ok ]
96 <comment>(Replace new-password with your desired password)</comment>
97 # <i>/usr/bin/mysqladmin -u root -h localhost password 'new-password'</i>
98 </pre>
99 @@ -165,7 +168,7 @@
100 <body>
101
102 <p>
103 -We have logged in and have a mysql prompt displayed. First let's take a look at
104 +We have logged in and a mysql prompt is displayed. First let's take a look at
105 the databases we currently have. To do so, we use the <c>SHOW DATABASES</c>
106 command.
107 </p>
108 @@ -186,9 +189,9 @@
109 </impo>
110
111 <p>
112 -Despite the fact that a test database is already created, we are going to create
113 -our own. Databases are created using the <c>CREATE DATABASE</c> command. We'll
114 -create one named "gentoo".
115 +Despite the fact that a test database is already created, we are going to
116 +create our own. Databases are created using the <c>CREATE DATABASE</c> command.
117 +We'll create one named "gentoo".
118 </p>
119
120 <pre caption="Creating the gentoo database">
121 @@ -218,12 +221,12 @@
122 </pre>
123
124 <p>
125 -Indeed our database has been created. In order to work with creating tables
126 -for our new gentoo database, we need to select it as our current database.
127 -To do so, we use the<c>USE</c> command. The <c>USE</c> command takes the
128 -name of the database you wish to use as your current database. Another
129 -option is to set it on the command line after the <c>-p</c> switch. Let's go
130 -ahead and switch to the gentoo database.
131 +Indeed our database has been created. In order to work with creating tables for
132 +our new gentoo database, we need to select it as our current database. To do
133 +so, we use the <c>USE</c> command. The <c>USE</c> command takes the name of the
134 +database you wish to use as your current database. Another option is to set it
135 +on the command line after the <c>-p</c> switch. Let's go ahead and switch to
136 +the gentoo database.
137 </p>
138
139 <pre caption="Switching our database">
140 @@ -244,15 +247,15 @@
141 <chapter>
142 <title>Working With Tables In MySQL</title>
143 <section>
144 -<title>Creating A Table</title>
145 +<title>Creating a Table</title>
146 <body>
147
148 <p>
149 In the structure of MySQL, there are databases, tables, records, and fields.
150 Databases hold together tables, tables hold together records, records hold
151 together fields, which contain the actual information. This structure lets
152 -users select how they want to access their information. So far we've dealt
153 -with databases, now let's work with tables. First off, tables can be listed
154 +users select how they want to access their information. So far we've dealt with
155 +databases, now let's work with tables. First off, tables can be listed
156 similiarly to databases using the <c>SHOW TABLES</c> command. Right now there
157 are no tables in our gentoo database, as running the command will show us:
158 </p>
159 @@ -265,8 +268,8 @@
160 <p>
161 This means we need to create some tables. In order to do so, we use the
162 <c>CREATE TABLE</c> command. However, this command is quite different from
163 -simple <c>CREATE DATABASE</c> command. This command takes a list of arguments
164 -you must give it. The form is as follows:
165 +simple <c>CREATE DATABASE</c> command. This command takes a list of arguments.
166 +The form is as follows:
167 </p>
168
169 <pre caption="CREATE TABLE Syntax">
170 @@ -278,17 +281,17 @@
171 let's make a table named <c>developers</c>. This table will contain the
172 developer's name, email and job. <b>field_name</b> will contain the name of the
173 field. We have 3 required names in this case: name, email, and job. The
174 -<b>field_data_type</b> is what type of information will be stored. The different
175 -formats avaliable can be found at the <uri
176 +<b>field_data_type</b> is what type of information will be stored. The
177 +different formats available can be found at the <uri
178 link="http://dev.mysql.com/doc/mysql/en/column-types.html">MySQL Column Types
179 Page</uri>. For our purposes, we'll use the <c>VARCHAR</c> data type for all of
180 -our fields. <c>VARCHAR</c> is one of the simplest of data types when it comes to
181 -working with strings. <b>size</b> is how much of data a single field will store
182 -of type <b>field_data_type</b>. In this case, we'll use 128 for our size. This
183 -means that the field can have <c>VARCHAR</c> data that is 128 bits. You can
184 -safely think of this as 128 characters for the time being, though there is a
185 -somewhat more technical explanation that the above site will provide you with.
186 -Now that we know how we are going to create the table, let's do it.
187 +our fields. <c>VARCHAR</c> is one of the simplest of data types when it comes
188 +to working with strings. <b>size</b> is how much of data a single field will
189 +store. In this case, we'll use 128. This means that the field can have
190 +<c>VARCHAR</c> data that is 128 bytes. You can safely think of this as 128
191 +characters for the time being, though there is a somewhat more technical
192 +explanation that the above site will provide you with. Now that we know how we
193 +are going to create the table, let's do it.
194 </p>
195
196 <pre caption="Creating our table">
197 @@ -297,8 +300,8 @@
198 </pre>
199
200 <p>
201 -Looks like our table was created ok. Let's check it with the <c>SHOW
202 -TABLES</c> command:
203 +Looks like our table was created ok. Let's check it with the <c>SHOW TABLES</c>
204 +command:
205 </p>
206
207 <pre caption="Verifying our table">
208 @@ -312,10 +315,10 @@
209 </pre>
210
211 <p>
212 -Yes, there's our table. However, it doesn't seem to have any information on
213
214
215
216 --
217 gentoo-doc-cvs@g.o mailing list