Home >Database >Mysql Tutorial >How Do I Access the MySQL Command Line Interface Using XAMPP on Windows?
Accessing the MySQL Command Line with XAMPP for Windows
Looking to access the MySQL command line for your XAMPP setup? This guide provides a comprehensive walkthrough that will help you get started:
Locate MySQL Binaries
Navigate to your XAMPP installation directory and search for the "/bin" folder. You should find the "mysql.exe" client in this folder.
Open Command Prompt
Launch the command prompt and navigate to the "/bin" folder by typing:
cd c:\xampp\mysql\bin
Initiate MySQL Command Line
To establish a connection to your MySQL server, type the following command:
mysql.exe -u root --password
Enter your MySQL password when prompted.
Utilize Command Line Tools
Once connected, you can access various MySQL command line tools, such as:
Example Commands
Here are some examples of MySQL commands you can execute:
Create a new database:
CREATE DATABASE new_db;
Display all databases:
SHOW DATABASES;
Access a specific database:
USE new_db;
Execute SQL queries:
SELECT * FROM my_table;
By following these steps, you can effectively access and utilize the MySQL command line with XAMPP for Windows.
The above is the detailed content of How Do I Access the MySQL Command Line Interface Using XAMPP on Windows?. For more information, please follow other related articles on the PHP Chinese website!