Import SQL File into MySQL in XAMPP from Command Line in MacOS

To import SQL file in XAMPP MySQL, first has to go to XAMPP MySQL bin then do the command standard Mysql import command line.

XAMPP Path in MacOS

Command in Terminal

Example:

XAMPP mysql import sql file

 

Access XAMPP 8.2.4 MySQL via Command Line in MacOS

You can access XAMPP 8.2.4 MySQL via command line in MacOS by following these steps.

1. Go to XAMPP 8.2.4 MySQL folder in MacOS

2. Type This Command

If successful, XAMPP will connect to MariabDB instead of MySQL

You can double check by getting all databases in the MariaDB.

 

macos xampp 8.2.4 mysql access via command line
macos xampp 8.2.4 mysql access via command line

How To Launch XAMPP After Installation?

I installed XAMPP then after installation the XAMPP control manager appeared after that. If you restart your computer, I wonder where I can launch it because XAMPP is not appeared in LaunchPad.

Applications folder of XAMPP also has so many files.

How To Launch XAMPP?

Go to Applications -> XAMPP -> xamppfiles .

Then click on manager-osx.

Key in your password and then the XAMPP control manager will appear.

manager-osx to open xampp
manager-osx to open xampp

How To Install PHP MySQL & Apache on MacOS Ventura on MacBook Pro M1

In my previous post, I was unable to install PHP & MySQL. This time after 2 years, I tried again but still fail, so I decided to use XAMPP to install PHP & MySQL and Apache on MacOS Ventura and it works!

But I had to disable default installed apache2 and change MySQL default port at XAMPP before MySQL and Apache2 can run on XAMPP.

How To Install PHP, MySQL & Apache using XAMPP

1. Download and install XAMPP

Mount the xampp dmg and run it. If you face unknown publish then do Control + Click on the XAMPP installer then run it again.

2. Follow the step by step instruction in installing XAMPP

Just follow the instructions.

3. Run the servers

If you unable to run the MySQL & Apache web server than follow below solution.

xampp macos ventura - mysql and apache webserver unable to start
xampp macos ventura – mysql and apache webserver unable to start

If you can run MySQL change it default ports. I use 3316 instead of default 3306.

xampp macos ventura - change the default port to 3316
xampp macos ventura – change the default port to 3316

I tried to stop mysql service but MacOS informed no MySQL service was running. Only by changing MySQL default port it works.

xampp macos ventura - mysql not running
xampp macos ventura – mysql not running

If you can’t run the apache2 server, stop default apache2 server by typing at the terminal.

Then run again Apache Web Server at XAMPP.

xamp macos ventura - apache webserver now running
xamp macos ventura – apache webserver now running

4. Test PHP & MySQL by accessing PhpMyAdmin

If you can access phpMyAdmin and create table or user from phpMyAdmin then your XAMPP installation works!

xampp macos ventura - access localhost and click phpmyadmin
xampp macos ventura – access localhost and click phpmyadmin
xamp macos ventura - successful installed php and mysql now can access phpmyadmin
xamp macos ventura – successful installed php and mysql now can access phpmyadmin