0

I have this PHP script:

<?php
  $dbc = mysqli_connect('localhost', 'root', 'whatevermypasswordis', 'MySQL80')
  or
  die(mysqli_connect_error());
  mysqli_set_charset($dbc, 'utf-8');
?>

mysqli_connect() does not connect properly to the SQL server.

I started with the script and ran it without the server. Then I installed the MySQL server using the MySQL installer and it did not want to connect.

Access denied for user 'root'@'localhost' (using password: YES)

Note that I am running Abyss Web Server on port 80 on a LAN router to make a 'local webpage' that only people that have access to my wifi router can see this webpage.

Now I am using XAMPP to run a server, following the instructions on this page. I cannot start the Apache server because the abyssws.exe(Abyss Web Server) app is already using it.

  • did you add your port in connection ? port=your_mySql_port; mostly 3306 or 7 or 8 on default –  Jan 02 '20 at 00:23
  • Please read: [Should we ever check for mysqli_connect() errors manually?](https://stackoverflow.com/q/58808332/1839439) – Dharman Jan 02 '20 at 00:29

0 Answers0