Can't connect to phpMyAdmin or localhost - php

Hi I've recently downloaded wamp server to help me with my website. My problem is that when I click on phpmyadmin I get an error message "HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."
Also when I click on my localhost i get this page which I don't think is correct
Finally to see my webpages I have to write http://localhost:8888/. If I placed the 8888 in front of of phpMyAdmin then I can see the phpmyadmin but its not synced with my mysql database and tables that I created, it's just a plain phpmyadmin. I don't know what to change or where to start to change things to get it to work properly so that I can see my tables and databases I created in mysql in PHPmyadmin.
In my httpd.conf the servername is *ServerName localhost:81*and the listen listen 81
Any help would be much appreciated

It's definitely not a problem to run IIS on your computer, you can even server phpMyAdmin from it if you have PHP properly configured. It sounds like you're running another webserver alongside IIS (I'm perceiving this based on the numerous ports you're using, you've referenced port 80, 81, 8080, and 8888), which also is fine (again, as long as you have them properly configured so as to not conflict). You can have one listen on port 80 and the other on 8080, for instance, so there's no conflict of ports.
You have to know which server is using which ports, and which server you're expecting to use phpMyAdmin from. If IIS isn't using the PHP interpreter and isn't configured to serve phpMyAdmin, then using the IIS port will give you the 404 error -- which appears to be the initial cause of your screenshot here.
You said that if you do use port 8888 you can use phpMyAdmin, but without access to the databases you expect to see. This is a good start and means one of two things happen -- either you're logged in as a user who doesn't have privileges to see those databases (perhaps the anonymous user) or you've also got two MySQL instances running on your machine with their own datadir (well, I couldn't even imagine what data corruption would occur if they shared the same datadir). Do you see any databases at all? Can you create a new database?
Can you connect at the command line client and see your databases? From the command line client use the STATUS; command to see the user and host you're connected as, then compare those to what's shown on the main page of phpMyAdmin. Note that hosts matter, % is not the same as localhost.

Related

Adminer: Is the server running locally and accepting connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?

This is the full error message:
Unable to connect to PostgreSQL server: could not connect to server:
No such file or directory Is the server running locally and accepting
connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
I get it when I open local Adminer URL after upgrading to OS X Mojave. I read a lot of answers here on SO and in other sites most of them say to check if Postgresql is running but in my case it is running. Or to create directories and change permissions but I don't think this is the issue. After all I've my own application running on the same environment and it's accessing Postgresql data.
I'm running Postgresql 9.6.
After trying a lot of things I got inspired by a post talking about localhost. As I said in the question my own application was able to connect to Postgresql and collect data.
At the end the solution is incredibly simple:
In the login form of Adminer you just need to fill the Server field with localhost (Pay attention! Usually you can already read "localhost" in that field but it's a suggestion not a real value, you actually need to type "localhost" inside.), in case you can also add the port, i.e. "localhost:5432".
The same should be valid if you get this error message in a generic PHP script.

Remote MySQL not working with Laravel Config

Our database server has grant access to all local ip's with user root and it works well to access them via cli in all local IP. But in our webserver (different machine), Laravel still can't connected to the database, here's the error:
I've tried to clear cache, reinstall the Laravel (install composer, generate new key etc.) change db config drive to sqli, it still error connecting the remote db, but why the DB works when I querying the DB via tinker on that machine, this is so unusual.
If your MySQL database is on a remote server it may well be one of the following issues:
Firewall Block, the server with the MySQL service may be behind a firewall that is set to block external access to the port that MySQL operates on.
MySQL User Permissions, if the MySQL service is not sat behind a firewall then the next cause may be that the user has only localhost access permissions.
You should try to log in to your remote server and, from there, connect to your database via some shell command to verify you actually can.
Security-Enhanced Linux (SELinux) is a Linux kernel security module that provides a mechanism for supporting access control security policies, including United States Department of Defense–style mandatory access controls (MAC).
httpd_can_network_connect (HTTPD Service):: Allow HTTPD scripts and modules to connect to the network.
Run as root:
# setsebool -P httpd_can_network_connect 1
Solved: php can't connect to mysql with error 13 (but command line can)
Now Laravel can connect the DB, By executing: setsebool httpd_can_network_connect=1 in Database Server. But I still don't understand why. Is there any reasonable explanation?

Apache, PHP, MySQL, PDO, Permission denied , laravel

I'm working on a fun little PHP web application (a manager for my repeating, daily tasks), mostly for the exercise. The 'production' server is a bit limiting, and I cannot view httpd's (Apache's) error logs there, so I've set up my own local httpd as a development server (just good sense). However, my web app makes use of a MySQL database. I will create a local one eventually, but I thought, to make things easier to start, I would just use the remote one.
SQLSTATE[HY000] [2002] Permission denied.
This is what came back each time I tried running the web application from my local httpd. I'm using PHP's PDO database interface, and its mysql driver, and it works when deployed on the remote server. I made sure that my remote server had permissions for my local user. I tested connecting from my local machine from the mysql client, and it worked. I tested the PHP connection statement from the command-line and ... it worked. It is only causing a problem when running within the web application.
Please tell me how to solve this issue. This is the site on which i am getting error pickprogress.com
Some various server provider gives us their database server name. And instead of writing localhost or 127.0.0.1 we have to write their given server name.
I was trying to solve this problem since last 8 hours but didn't found single solution but anyhow I have now solved it.

Is the database created in MySQL with terminal different from the database that show in the PhpMyAdmin?

I have created a database in MySQL with terminal, and I tried to find it in PhpMyAdmin I couldn't find it. My question is, are those two databases different from each other or did I do something wrong that is why it didn't show up?
PHPMyAdmin is just a web GUI that acts as a client for interacting with the MySQL Server. In the terminal, you access the server using the mysql command-line client, and create a database on the server.
Now, both of these clients can be configured to use any MySQL server that they can access over the network. The command-line client defaults to connecting to 127.0.0.1 on port 3306 (or /var/run/mysql.sock but that's unimportant in this case). In PHPMyAdmin,config.php defines what server you connect to. I don't remember the defaults, but servers are configured via $cfg['Servers']. This document explains the configuration. So, you should be able to look at config.php and determine whether or not you're connecting to 127.0.0.1 port 3306.
Another possible reason you might not see the DB in PHPMyAdmin is if only_db is set in config.php. Look for $cfg['Servers'][$i]['only_db'].
Also ensure that you actually created the database and that it shows in SHOW DATABASES; in the mysql command-line client.
Hi #mayleficent Your phpMyAdmin comes as a package with php, mysql and extra apps. So if you have installed any mysql server explicitly that would be totally differant from mysql in xamp/wamp package. So if you remove that explicitly installed mysql you can access the mysql linked with phpmyadmin. To goto terminal associated with phpmyadmin, then you have to browse to the folder in your xamp/wamp. the path appears as shown below.
C:\xampp\mysql\bin>mysql -u root -p admin

How to fix "#2003 - Can't connect to MySQL server on '127.0.0.1' (61) the server is not responding."

I am having issues connecting to MySQL server. I go to localhost:8888/phpMyAdmin/?lang=en and get the error:
"#2003 - Can't connect to MySQL server on '127.0.0.1' (61) the server
is not responding."
I've tried many different solutions however, none have worked. If anyone has any advice or ways to fix this, it would be a great help.
Ensure that MySQL is enabled in MAMP, and that you have also enabled "Allow network access to MySQL" in MAMP's MySQL settings page.
I'd recommend restarting your system, and confirming that mysql daemon start with your mamp server properly. You may also try logging into the command line mysql, and observe the configuration. You seem to suggest that you have tried many things, and I assume that you tried restarting. I know it seems ridiculous to ask you to repeat this... but, you want a clean entry point to observe the issue. There may be another mysql server running as well, or it may not be serving where you think it is. By logging into MySql as root, you should be able to determine some of the mis-configuration issues.
I went to /Applications/MAMP/bin/phpMyAdmin/config.inc.php and updated the line $cfg['Servers'][$i]['host'] = '127.0.0.1';
from 127.0.0.1 to localhost.

Categories