Installing MySQL on Windows
Installing the Community Edition
There are two versions of MySQL: Community Edition (free) and Enterprise
Edition ($$$).
If you are upgrading from a previous version of MySQL that is running as
a service, then you must stop the service and remove it. This can be accomplished
with the following steps.
-
Open a command prompt window.
-
Change to the bin dircetory of the current installation.
-
Issue the following commands:
mysqladmin -u root -p password shutdown
mysqld --remove
Go to the download page for windows:
http://mysql.org/downloads/mysql/5.0.html#win32
Download the zip file that has the self-extracting exe file: Windows (x86)
ZIP/Setup.EXE
Unzip the file and run Setup.exe
Configuriung MySQL
-
Detailed Configuration -> Next
-
Developer Machine -> Next
-
Multifunctional Database -> Next
-
Choose the default settings until you reach the root password page. Enter
a password and REMEMBER it.
To test the configuration:
-
Open a command prompt window.
-
Change to the bin directory of the new installation. Most likely, this will
be
C:\Program Files\MySQL\MySQL Server 5.0\bin
-
Enter the command to log onto MySQL
mysql -u root -p
Enter Password:
-
You should see the MySQL prompt
mysql>
-
Type exit to close MySQL
mysql> exit
Creating a username and database that are the same as the ones on ocelot.
Follow these steps to create a user account named spr07_username and a database
named spr07_username.
Log on as the root account:
-
Open a command prompt window.
-
Change to the bin directory of the new installation. Most likely, this will
be
C:\Program Files\MySQL\MySQL Server 5.0\bin
-
Enter the command to log onto MySQL
mysql -u root -p
Enter Password:
-
You should see the MySQL prompt
mysql>
Create a user account
-
Enter the following command to create an account named
spr07_username
. Replace some_pass
with your password.
You may hit the enter key after any word to continue the command on the next
line.
GRANT ALL PRIVILEGES ON *.* TO 'spr07_username'@'localhost' IDENTIFIED BY
'some_pass' WITH GRANT OPTION;
Creating a database
-
Create a database named spr07_username by issuing the following command.
create database spr07_username;
Test the new username and database.
-
Close MySQL
exit
-
Log into MySQL
mysql -u spr07_username -D spr07_username -p
Enter Password: