mysqli_connect (): (HY000 / 1049)

Problems with the Windows version of XAMPP, questions, comments, and anything related.

mysqli_connect (): (HY000 / 1049)

Postby Jannirod » 20. March 2021 18:31

Hello, when I open the local host on the web on XAMPP , the folder where the PHP web page is, I open it and the following code appears
Warning: mysqli_connect (): (HY000 / 1049): Unknown database 'school_system_2' in C: \ xampp \ htdocs \ test \ models \ Server.php on line 23

Fatal error: Uncaught TypeError: mysqli_error (): Argument # 1 ($ mysql) must be of type mysqli, bool given in C: \ xampp \ htdocs \ test \ models \ Server.php: 23 Stack trace: # 0 C: \ xampp \ htdocs \ test \ models \ Server.php (23): mysqli_error (false) # 1 C: \ xampp \ htdocs \ test \ models \ Login.php (12): Server -> __ construct () # 2 C: \ xampp \ htdocs \ test \ controllers \ index_controller.php (15): Login -> __ construct () # 3 C: \ xampp \ htdocs \ test \ Index.php (3): require_once ('C: \\ xampp \\ htdocs ... ') # 4 {main} thrown in C: \ xampp \ htdocs \ test \ models \ Server.php on line 23.

What do you recommend me to do? :|
Jannirod
 
Posts: 1
Joined: 20. March 2021 18:23
XAMPP version: 3.2.4
Operating System: Windows 10 Home

Re: mysqli_connect (): (HY000 / 1049)

Postby Altrea » 20. March 2021 18:43

Hi,

The error message is pretty much self explaining. There is a file "C:\xampp\test\models\Server.php" which tries to connect to the database "school_system_2" which does not exist.
We cannot tell you what "C:\xampp\test\models\Server.php" is or what "school_system_2" is. Both are parts not shipped with XAMPP.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 154 guests