MySQL database bug tracking on Windows
Bugzero one-for-all bug tracking and help desk support system
 
Q: How to install and run MySQL 3.x on Microsoft Windows?

A: The following is for installing MySQL 3.x onto Windows. For MySQL 4.x, see
   Installing MySQL 4.x.

0. You install MySQL using the installer and then follow the steps below to
   configure and run mysqld. For the convenience of discussion, let's assume you
   have installed Mysql on c:\mysql.

1. Copy my-large.cnf to c:\my.cnf and edit this file, in the [mysqld] section,
   change set-variable    = max_allowed_packet=1M
   to     set-variable    = max_allowed_packet=12M
   and modify the location to (IMPORTANT!):
          basedir = c:/mysql/
	  datadir = c:/mysql/data/

2. If you want use password, you need edit my.cnf by un-commenting out 
	password=my_password
   in the [client] section. Not that, my_password is NOT the real password, it
   just indicates that a password is needed to access the database server.

3. You need add c:\mysql\bin in your system environment variable PATH: 
   On NT, right click on My Computer -- Properties -- Environment and then
   select the path, edit it to add c:\mysql\bin
   On Window 2000, right click on My Computer -- Advanced -- Environment Variables ...

4. The MySql database server (mysqld) can be started by double clicking on
   mysqld.exe in the c:\mysql\bin folder.
   You can also install a MySql service by the command 
   'mysqld -install'
   and then use this NT service to start/stop the MySql server.

5. Now, after you start mysqld, you should see it by Task Manager -- Processes
   If you don't see it, then it means something is wrong and the server did not start.
   You can launch a DOS window, and cd  c:\mysql\bin, and type myqld.exe. The DOS
   window should stay there and you should see the error message it prints out.
  
   MySQL runs on port 3306, and so if you type "netstat -na" in the DOS window, you should
   see it is listed there.

6. Assuming mysqld starts, you can launch a DOS window and type 'mysql -u root'
   If you uncommented out password=my-password, it might ask you for password.
   If so, you need first set a psssword for root by:
        mysqladmin -u root password new_password
   Here new_password is any password you would like to set for the root (of mysql)

7. After user root logged in, you should see the mysql> prompt.
   Now, first type 
   mysql> use mysql;
   and then create a database by:
   mysql> create database bugzero_db;
   Here, bugzero_db is the database name.
   You can create a user account bugzero with the following command:

   mysql> GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,ALTER,CREATE,DROP ON bugzero_db.*
              TO bugzero@"%" IDENTIFIED BY 'bugzero_password';
   mysql> GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,ALTER,CREATE,DROP ON bugzero_db.*
              TO bugzero@localhost IDENTIFIED BY 'bugzero_password';

   Note that, the user and database name can be any valid name, we use bugzero and
   bugzero_db only for the convenience of discussion.

8. To see the bugzero_db database is created, type 
   mysql> show databases;
   You should see bugzero_db is listed. To see the bugzero user, you can type
   mysql> select host,user,password from user;
   you should see bugzero is listed.

9. Now, log off user root, and login user bugzero by typing
        mysql -ubugzero -p
   it should ask you for a password

   Here, we assume you are using password, otherwise,
   you just need need type
        mysql -ubugzero

10. Now within mysql>, type use bugzero_db;
    You should be in the database bugzero_db.

    If access denied, then, you may need another grant, see MySql connection problem
    for more detail.

11. If all these steps are taken and no errors occur, your mysql database is set!

* Reference brought to you by Bugzero, it's more than just defect tracking software!

Home - FAQs