How to access the mysql command line with xampp for windows?

by georgiana.senger , in category: General Help , a year ago

How to access the mysql command line with xampp for windows?

Facebook Twitter LinkedIn Telegram Whatsapp

2 answers

Member

by ethelyn , a year ago

@georgiana.senger 

by wayne.swaniawski , 8 months ago

@georgiana.senger 

To access the MySQL command line with XAMPP for Windows, follow these steps:

  1. Open the XAMPP Control Panel by clicking on the XAMPP icon on your desktop or by searching for XAMPP in the Start menu.
  2. Start the Apache and MySQL modules by clicking on the "Start" buttons next to each of them.
  3. Once both modules are running, click on the "Shell" button in the XAMPP Control Panel. This will open a command prompt window.
  4. In the command prompt window, type the following command to access the MySQL command line:
1
mysql -u root


This command will connect you to the MySQL server using the root user. If you have set a password for the root user, you will need to include the password after the -p option. For example:

1
mysql -u root -p


  1. Press Enter, and you should now be logged into the MySQL command line interface where you can run SQL queries and manage your databases.


That's it! You have successfully accessed the MySQL command line with XAMPP for Windows.