10

I installed XAMPP (Apache, PHP, MYSQL) in my computer C:\xampp. When I tried to start phpMyAdmin from my web browser with http: followed by //localhost/phpMyAdmin/ as address, I got "Unable to connect" error. I searched stackoverflow and found that someone else tried the same thing but got different error. Also, I would like to know how to open a .php file on local computer in web browser. Thank you.

8 Answers 8

21

XAMPP by default uses http://localhost/phpmyadmin

It also requires you start both Apache and MySQL from the control panel (or as a service).

In the XAMPP Control Panel, clicking [ Admin ] on the MySQL line will open your default browser at the configured URL for the phpMyAdmin application.

If you get a phpMyAdmin error stating "Cannot connect: invalid settings." You will need to make sure your MySQL config file has a matching port for server and client. If it is not the standard 3306 port, you will also need to change your phpMyAdmin config file under apache (config.inc.php) to meet the new port settings. (127.0.0.1 becomes 127.0.0.1:<port>)

Sign up to request clarification or add additional context in comments.

Comments

15

Try: localhost:8080/phpmyadmin/

Comments

2

Your web server isn't running! You need to find the XAMPP control panel and start the web server up.

Of course, you might find other problems after that, but this is the first step.

Comments

1

You dont start phpmyadmin from your webbrowser. When you want to start PHPMyAdmin you have to do so from the XAMPP control-panel. When you've started phpmyadmin from your control-panel you can access it from the web-browser.

4 Comments

OK I found the XAMPP control panel and started Apache. But now I got a different error: Object not found! (error 404). It seems that the browser does not recognize localhost.
I clicked admin button of MySQL in XAMPP control panel but got a n error #1045 Access denied for user 'root'@'localhost' (using password: NO). I had loged in MYSQL as root with password in Windows CMD, but I cannot enter my password in XAMPP control panel. (my computer has Windows 7 professional).
You have to start the MySQL aswell. If you haven't set any password for your database then you should login as: username: root password should be blank.
@user3334714, you can add your MySQL password to the phpMyAdmin config file (config.inc.php). This file can be opened by pressing [ Config ] on the Apache line and choosing the appropriate option. The line looking for your MySQL password is $cfg['Servers'][$i]['password'] = '';
1

http://localhost:(port number of phpmyadmin)/phpmyadmin/

For example: http://localhost:8080/phpmyadmin/

It works great!

Comments

0

Try : http://localhost/phpmyadmin/

Use lowercase letters and try again

Comments

0

Well I also meet same problem before.

So I think you maybe didn't run apache server.

To open phpmyadmin page, you should start apache server.

Of course, without running Apache server, you project can be running, such as Laravel.

Comments

0

In my case the XAMPP port was 8082, and I used http://localhost:8082/phpmyadmin/ and it worked!

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.