phpmyadmin command line| xampp mysql | mysql command line | mysql query in php

XAMPP is a software distribution which provides the Apache web server, MySQL database, PHP or many more  all in one package.it also provided  PhpMyadmin which gives a GUI tool for managing your MySQL databases

You can to connect phpMyadmin to MySql command line.

We can connect PhpMyadmin to command line in 3 ways.

  • XAMPP Shell
  • From xampp mysql directory and open command line and use MySQL command
  • Set Path XAMPP MySql path in Environment Variable.

Let’s discuss each one

Related : Download and Install XAMPP

1. XAMPP Shell

start xampp
start xampp
  • use mysql command “mysql -uroot -p” to login into mysql, here -u for taking user name of mysql and -p for password.
  • PhpMyadmin default user name is : root and password : null/nothing (blank) Note : just hit enter without entering anything
XAMPP Mysql command line
XAMPP Mysql command line

2. XAMPP Mysql directory

  • Go to C:\xampp\mysql\bin or which drive you have installed xampp. Basically, you should go \xampp\mysql\bin
  • type cmd, address bar
Mysql path in xampp
Mysql path in xampp
  • use mysql command “mysql -uroot -p” to login into mysql, here -u for taking user name of mysql and -p for password.
  • PhpMyadmin default user name is : root and password : null/nothing (blank) Note : just hit enter without entering anything
XAMPP Mysql command line
XAMPP Mysql command line

3. Set MySql path in environment variable

To set path of Mysql or any other application in environment variable, is very useful for application. Follow below steps to set the path.

Search environment variable
Search environment variable
Environment Variable
Environment Variable
Edit Environment Variable
Edit Environment Variable
Set MySql Path
Set MySql Path

Note: Click on “ok” for all windows/pop box (3 windows/pop-box including this)

Open command prompt
Open command prompt
Login in mysql
Login in mysql

MySql Query explaination

  • use mysql command “mysql -uroot -p” to login into mysql, here -u for taking user name of mysql and -p for password.
  • PhpMyadmin default user name is : root and password : null/nothing (blank) Note : just hit enter without entering anything
  • to create database in mysql run command create database learn_php, here learn_php is database name and create database is mysql command.
  • for use of created database run command use learn_php. Here use is mysql command and learn_php is database name.
  • You can create table as well insert data into created table or do many operation as per your need. e.g. select data, join, etc.

admin

I am a well-organized professional in Drupal Development and PHP web development with strong script handling knowledge or automation process with PHP. I awarded 2 times in year by my company for the best employee of the quarter. I never work to complete my working hours. I worked for only achievement.

Leave a Reply