How To Run Mysql on Command Line
Open the MySQL on command line from cmd, you need to use Database username root with your Database password.
1) Go to :
C:\xampp\mysql\bin
2) Goto C:\xampp\mysql\bin
3) Now Open CMD
4) Enter Your Command : mysql -uroot -p
4) Enter Your Password But By Default Password Is Blank - Hit Enter
C:\xampp\mysql\bin>mysql -uroot -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 48
Server version: 10.4.17-MariaDB mariadb.org binary distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
Or
@echo off
set /p name=Enter the Username:
set path=C:\xampp\mysql\bin
mysql.exe -u %name% -p --host=localhost --port=3306
pause
2) Save The Code is <anyname>.cmd
3) Now Open This File <anyname>.cmd
4) Enter Your User Name like as root ( As Your Mysql Password )
4) Enter Your Password But By Default Password Is Blank - Hit Enter
Enter the Username:root
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 46
Server version: 10.4.17-MariaDB mariadb.org binary distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
0 Comments