Installing MySQL Database

Xpert

202.***.***.***
2,052 days ago

Installing MySQL Database

Overview: Configuring Mysql on your web server and write commands to create databases, adding users and creating password.

Download the appropriate version and install MySQL on your computer.

If are using Windows N.T / 2000 / XP, then you should install MySQL as a service. Follow these steps to install MySQL as service.

1) First go to command prompt (Dos Prompt) then Go to c:\mysql\bin

2) Enter this command mysqld-nt --install this will install MySQL as a service and it will load automatically with windows the next time you boot.

* You can also use these commands (First go to c:\mysql\bin)
NET START mysql To start Mysql
NET STOP mysql To Stop Mysql


Creating a New Database in MySQL

1) First go to c:\mysql\bin

2) Enter the command mysql

3) Enter this command create database mybuddy;

4) The above command will create the database mybuddy
The syntax for creating the database is create database database_name;


Creating a New User on (mybuddy) Database in MySQL

1) First go to c:\mysql\bin

2) Enter the command mysql

3) Enter use mybuddy (This will change the current database to mybuddy)

4) Enter the command exactly as show below this will create a use called buddy_user with password mypass on the mybuddy database. GRANT ALL PRIVILEGES ON mybuddy TO buddy_user@localhost IDENTIFIED BY 'mypass' with GRANT OPTION;

5) quit;