Microsoft Word - Sam's Teach Yourself MySQL in 21 Days - SAMS.doc

(singke) #1

Q&A


Q: (^) What do I do if I forget the MySQL root password?
A:
First log in to the system as the same person who is running the mysqld
daemon (probably root). Kill the process, using the kill command.
Restart MySQL with the following arguments:
bin/mysqld –Skip-grant
USE mysql;
UPDATE user SET password = password('newpassword')
°WHERE User = 'root';
Exit
bin/mysqladmin reload
The next time you log in, you will use your new password.
Q:
How do I change the startup options on MySQL if I use mysql.server
to start in the rc.d directory?
A:
mysql.server is a script that contains the mysqld command. To add
options such as logging and debugging to the server daemon, you must edit
this script. Using your favorite editor, open this file and place the arguments
in the appropriate places.
Q:
I'm a consultant providing services to a client who uses a MySQL
database for a nonprofit organization. Who pays the licensing fees?
A:
If you are making money using or providing services for a MySQL database,
you must pay the licensing fee. Remember that the fee is relatively small
and goes toward further development of this great DBMS.
Q: Where is the data stored in a MySQL database?
A:
MySQL uses files to store data. These files are under the
data/databasename directory, where databasename is the name of the
database. There are three file types: .ISM, .FRM, and .ISD. The .FRM file
contain the table schema. The .ISD is the file that actually holds the data.
The .ISM file is the file that provides quick access between the two of them.
Q: Why do I have to pay for the Windows version of MySQL?
A:
As stated earlier, MySQL is part of the Open Source Movement, which
means that there are a lot of people working on the MySQL project from all
over the world. Most of these people do it for free. Because they are not
getting paid, most of these developers use free tools, such as compilers like
gcc and IDEs, to help with the development process. Unfortunately,
developing for the Windows platform is a little different. To compile a
program on the Windows platform, a developer must pay for a compiler,
such as Visual C++ or a similar Borland compiler. These programs cost a lot
of money. To develop on this platform, TcX must buy these compilers for
their developers. This cost is transferred down to the user. That's why you
have to pay.


Exercises



  1. Using the command line, display all the data in the MySQL database.

  2. Check to see if the mysqld daemon is running using two different methods.

  3. Telnet to a remote site and start and stop the MySQL server.

  4. Use the MySQL monitor remotely.


Exercises



  1. Using the command line, display all the data in the MySQL database.

  2. Check to see if the mysqld daemon is running using two different methods.

  3. Telnet to a remote site and start and stop the MySQL server.

  4. Use the MySQL monitor remotely.


The Design Process


A good design makes or breaks a database. To create a successful database, some thought has to be given
to its design. A well-designed database will grow well. Retrieving and maintaining the information in a well-
designed database is a breeze. Unfortunately, most people do not take the time to design a database. They

Free download pdf