About 1,300,000 results
Open links in new tab
  1. php - Not connecting to database - Stack Overflow

    mysql_select_db () fails unless the connected user can be authenticated as having permission to use the database. Here's my comment in answer form: Do the same or die ('Could not use DB: ' . mysql_error()) after the mysql_select_db() call to find out what's going on there.

  2. How to Fix "Cannot Connect to the Database" Error in PHP

    Dec 11, 2024 · The “Cannot Connect to the Database” error arises when PHP fails to establish a successful connection to the database server. This issue can stem from incorrect configurations, server problems, or network issues.

  3. My Sql connect to database not showing anything in browser

    Nov 21, 2017 · When I opened php file in browser then a blank page opened. There should be either connected to the database or failed to connect to database. My coding of php file is given below: Please help me as less time is remaining for last date of submission.

  4. php - Cannot access MySQL database from my website, but can …

    I'm trying to hook up my website to my MySQL database on my new webhost, and I'm running into a few issues I can't resolve. If I navigate to mywebsite.com/phpmyadmin/, I'm presented with an HTTP authorization, and upon successful entry of that, my PHPMyAdmin login page, where I can log-in as my user and see my databases. Yet, if I try to ...

  5. PHP Database connection - GeeksforGeeks

    Nov 2, 2020 · Then open your web browser and type localhost/data.php; Finally the database is created and connected to PHP. If you want to see your database, just type localhost/phpmyadmin in the web browser and the database can be found.

  6. Why can't I connect to mysql via the browser but via the terminal with php?

    Jun 26, 2018 · A comment in a stackoverflow question about accessing a MariaDB database with PHP via a browser states ''newer versions of MariaDB / MySQL don't allow you to use the root user via PHP.'' When using a different user than the root I can indeed connect to the MySQL database as intended.

  7. Cannot access database from PHP script when called from web …

    Sep 7, 2024 · php -r "require 'database.php'; db_connect();" it works fine: Connected to db. And I can also connect to the SQL database using: mysql -u root -p and entering the same password. But when the above function is called from a PHP script, like this samples.php:

  8. Step by Step Guide: Connect PHP to MySQL Database Using …

    Jul 21, 2024 · In this guide, we will explore how to connect PHP to MySQL using XAMPP, a free, open-source software stack that includes the Apache web server, MariaDB database, and interpreters for scripts written in PHP and Perl.

  9. PHP App/Website wont connect to database, but MySQL …

    Jan 28, 2024 · As I understand, you are trying to Use PHP to connect and query data in Azure Database for MySQL and could not do so. Could you please refer to the official Microsoft documentation here: https://learn.microsoft.com/en-us/azure/mysql/single-server/connect-php#step-1-connect-to-the-server

  10. mysql - PHP: could not find database - Stack Overflow

    Apr 20, 2015 · Your message in your title seems to be coming from your selectdb line, so you're actually connecting to the database fine, it's just not able to locate the schema that you are trying to use (i.e. "search" does not exist as a schema name in your DB environment).

Refresh