Connect to MySQL Database using CMD on Localhost (XAMPP)
In command prompt, change the folder to mysql folder in XAMPP. Enter the following code for connect to your database. Note the code below assumes there is no password for the root user (localhost).