Searching...
Wednesday 17 October 2012

Mysql Installation

11:15 pm

Mysql Installation

Mysql Installation :

MySQL  DB Server is installed along with XAMPP in c:\xampp\mysql. All the my sql databases are present in c:\xampp\mysql\data folder.
1.      To start mysql db server
Click on start button of mysql in xampp control panel.
C:\xampp\mysql\bin>mysqld
2.      to stop MySQL DB server
click on  start button of mysql in xampp control panel[the default user name of mysql is “root” with no password].
C:\xampp\mysql\bin>mysqladmin –u root shutdown
3.      to get mysql prompt
c:\xampp\mysql\bin\mysql –u root –p
4.      to display all db names
mysql>show databases
5.      to create a DB
mysql> create database india;
6.      to activate a DB
mysql> use india
7.      to create a table
mysql> create table emp (empno number(10) primary key,ename varchar(20), sal float(10,2));
8.      to display all the table names
mysql>show tables.
9.      To insert a new record
Mysql>insert into emp values(101,’chandu’,123.45);
10.  To display the structure of a table
Mysql>desc emp /describe emp;
11.  To display all the records in a table
Mysql>select * from emp;
12.  To delete  a table
Mysql>drop table emp;
13.  To delete an entire DB
Mysql>drop database india;
14.  To create a user
Mysql>create user ‘chandu’@’localhost’ identified by ‘india’;
Provide the required previlizes to chandu@localhost.
Mysql> grant select ,insert,update,delete,drop,shutdown,alter,show databases on *.* to ‘chandu’@’localhost’ identified by ‘india’ with grant option max_queries_per_hour 0 max_connections_per_hour 0 max_updates_per_hour 0 max_user_connections 0;
Mysql>grant all privileges on ‘chandu\_%’.* to ‘chandu’@’localhost’;

mysql installation,mysql installation guide,mysql installation mac,mysql installation linux,mysql windows installation,php mysql installation,mysql installation ubuntu,mysql installation and configuration,installation of mysql.

0 comments:

Post a Comment