filmov
tv
How to connect and create database in mysql using command line xampp

Показать описание
How to connect and create database in mysql using command line in xampp
By following below steps you can connect / create database.
Assume that you xampp install in C drive.
When you open command prompt then give following path.
Syntax to connect database :
e.g : mysql -h root -p;
when you type -p then it ask for password.
Syntax to create database :
CREATE DATABASE TESTDB;
To view list of database :
SHOW DATABASES;
To use specific database :
USE TESTDB;
To show all list of table in database :
SHOW TABLES;
Syntax to create new table :
CREATE TABLE Persons
(
PersonID int,
LastName varchar(255),
FirstName varchar(255),
Address varchar(255),
City varchar(255)
);
#techquerypond
connect database mysql php
mysql connect to database
By following below steps you can connect / create database.
Assume that you xampp install in C drive.
When you open command prompt then give following path.
Syntax to connect database :
e.g : mysql -h root -p;
when you type -p then it ask for password.
Syntax to create database :
CREATE DATABASE TESTDB;
To view list of database :
SHOW DATABASES;
To use specific database :
USE TESTDB;
To show all list of table in database :
SHOW TABLES;
Syntax to create new table :
CREATE TABLE Persons
(
PersonID int,
LastName varchar(255),
FirstName varchar(255),
Address varchar(255),
City varchar(255)
);
#techquerypond
connect database mysql php
mysql connect to database