go to xammp folder -==> mysql folder
-==> bin - select m
ysql.exe open it now you access phpmyadmin in cmd
---
mysql -u root -p -h localhost
---> connect data base
show databases;
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| cdcol |
| dbatt |
| dbtest |
| laalive |
| mysql |
| performance_schema |
| phpmyadmin |
| sad |
| test |
| webauth |
+--------------------+
11 rows in set (0.00 sec)
----------
create database sanjayhk;
-----
all step to access database
=================
C:\Users\admin>f:
F:\>cd f:\xampp\mysql\bin
f:\xampp\mysql\bin>mysql -u root -p -h localhost
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
f:\xampp\mysql\bin>mysql -u root -p -h localhost
Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 22
Server version: 5.6.21 MySQL Community Server (GPL)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| cdcol |
| dbatt |
| dbtest |
| laalive |
| mysql |
| performance_schema |
| phpmyadmin |
| sad |
| sanjayhk |
| test |
| webauth |
+--------------------+
12 rows in set (0.00 sec)
mysql> create database hk;
Query OK, 1 row affected (0.03 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| cdcol |
| dbatt |
| dbtest |
| hk |
| laalive |
| mysql |
| performance_schema |
| phpmyadmin |
| sad |
| sanjayhk |
| test |
| webauth |
+--------------------+
13 rows in set (0.00 sec)
mysql> use hk;
Database changed
mysql> show tables;
Empty set (0.00 sec)
mysql> create table admin (name varchar(20));
Query OK, 0 rows affected (0.36 sec)
mysql> insert into admin values('sanjay');
Query OK, 1 row affected (0.11 sec)
mysql> select * from admin;
+--------+
| name |
+--------+
| sanjay |
+--------+
1 row in set (0.00 sec)
MySQL>
-==> bin - select m
ysql.exe open it now you access phpmyadmin in cmd
---
mysql -u root -p -h localhost
---> connect data base
show databases;
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| cdcol |
| dbatt |
| dbtest |
| laalive |
| mysql |
| performance_schema |
| phpmyadmin |
| sad |
| test |
| webauth |
+--------------------+
11 rows in set (0.00 sec)
----------
create database sanjayhk;
-----
all step to access database
=================
C:\Users\admin>f:
F:\>cd f:\xampp\mysql\bin
f:\xampp\mysql\bin>mysql -u root -p -h localhost
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
f:\xampp\mysql\bin>mysql -u root -p -h localhost
Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 22
Server version: 5.6.21 MySQL Community Server (GPL)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| cdcol |
| dbatt |
| dbtest |
| laalive |
| mysql |
| performance_schema |
| phpmyadmin |
| sad |
| sanjayhk |
| test |
| webauth |
+--------------------+
12 rows in set (0.00 sec)
mysql> create database hk;
Query OK, 1 row affected (0.03 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| cdcol |
| dbatt |
| dbtest |
| hk |
| laalive |
| mysql |
| performance_schema |
| phpmyadmin |
| sad |
| sanjayhk |
| test |
| webauth |
+--------------------+
13 rows in set (0.00 sec)
mysql> use hk;
Database changed
mysql> show tables;
Empty set (0.00 sec)
mysql> create table admin (name varchar(20));
Query OK, 0 rows affected (0.36 sec)
mysql> insert into admin values('sanjay');
Query OK, 1 row affected (0.11 sec)
mysql> select * from admin;
+--------+
| name |
+--------+
| sanjay |
+--------+
1 row in set (0.00 sec)
MySQL>
No comments:
Post a Comment