PDA

View Full Version : How to setup a mySql database


Cameron Allen
08-24-2004, 02:59 AM
#####################################
## HOW TO SETUP A mySQL DATABASE
#####################################

To create a database in mySQL, you must first access the
mySQL interface.

LINUX MACHINES:
-------------------------------------------------------------
Via TELNET or SSH with "root" access, type mysql in the command prompt to access mysql. Then type the following commands at the mysql command line:



create database DATABASE_NAME_HERE;

###hit 'Enter'### , ex: create database my_website_database;



grant all privileges on DATABASE_NAME_HERE.* to USER@localhost

###hit 'Enter'### , ex: grant all privileges on my_website_database.* to mitch@localhost



identified by 'Password' with grant option;

###hit 'Enter'### , ex: identified by 'Secret552' with grant option;



WINDOWS MACHINES:
-------------------------------------------------------------
Locate the mysql.exe file and execute it. This is generally
installed by default in c:\mysql\bin\mysql.exe. This will
open a "DOS" type window running the mySQL interface. This
is the same interface used within Linux as well.


CREATE THE DATABSE:
-------------------------------------------------------------


create database DATABASE_NAME_HERE;

###hit 'Enter'### , ex: create database my_website_database;



grant all privileges on DATABASE_NAME_HERE.* to USER@localhost

###hit 'Enter'### , ex: grant all privileges on my_website_database.* to mitch@localhost



identified by 'Password' with grant option;

###hit 'Enter'### , ex: identified by 'Secret552' with grant option;


Database creation complete. Please note that the application
will create and maintain its own table structures.