How to connect to my SQL Base?

What issue or error are you experiencing?

I created a MYSQL Database that I named “f6flu” and manually I added records to this database without problem
Now I’m trying to connect via a PHP form
but if I look in “Local” my database is under “MySQL”
But I can’t connect
attached some screenshots if you could help me?
THANKS


What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc


2023-11-28 14_16_24


System Details

  • Local Version:
    Local 8.1.0+6514
  • Operating System (OS) and OS version:
    Windows 11
    local-lightning.log (74.6 KB)

Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)
local-lightning.log (74.6 KB)


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

If you change your Router Mode to Site Domains are you able to proceed? Preferences>Advanced>Router Mode

Hello
I’m in “site domains” mode
but I don’t know what the name of the database is for the connection,
I’ve tried several options with no results…

but thank you for taking the time to try to help me



2023-11-28 23_18_09

Sorry I misunderstood what you were trying to do here. What “PHP form” are you trying to connect to?

PHP form actually means a php file from which I try to connect to my database

I therefore have a file written in PHP which allows me to interact with my table in my database in order for example to add a record or delete one or modify a record

It is this file that I use in operation but locally I must give the name of the database, the name of the table to create or modify, the logging and the password

so I have something like this in my PHP file:

$bdd = “f6flu”;
$host= “localhost:10010”;
$login = “root”;
$pass = “root”;

then I try to connect to my database:

$server_connection=mysqli_connect($host,$login,$pass) or die (“error connecting to server $host”);
$connection_base=mysqli_select_db($connection_server,$bdd);

$query = “SELECT * from f6flu” ;
$result= mysqli_query ($server_connection,$query);

if(!$result) // Error the query did not execute correctly
{
$err_req =mysqli_connect_errno();
echo (“


Database connection error: $bdd”);
echo (“

host, login, pass, Database: $host, $login, $pass, $database
”);
echo (“
mysqli_query result: $err_req
”);
}

and every time I get an error telling me that it doesn’t know the table “f6flu”
so I assume either the SQL table name or my SQL file name is not correct, but I don’t know how to do it exactly?

of course in operation it works well if I give the correct name of the database and the correct name of the SQL table; so I would like to do the same thing but with “Local”
Thanks again
2023-11-29 09_12_54