Consider our persons database table has the following records:
+----+------------+-----------+----------------------+
| id | first_name | last_name | email |
+----+------------+-----------+----------------------+
| 1 | Peter | Parker | peterparker@mail.com |
| 2 | John | Rambo | johnrambo@mail.com |
| 3 | Clark | Kent | clarkkent@mail.com |
| 4 | John | Carter | johncarter@mail.com |
| 5 | Harry | Potter | harrypotter@mail.com |
+----+------------+-----------+----------------------+
Fatal error: Uncaught mysqli_sql_exception: Access denied for user 'root'@'localhost' (using password: NO) in /data02/virt59468/domeenid/www.lorents.ee/htdocs/rakendused/php4/examples/mysql-select-query.php:16
Stack trace:
#0 /data02/virt59468/domeenid/www.lorents.ee/htdocs/rakendused/php4/examples/mysql-select-query.php(16): mysqli_connect('localhost', 'root', Object(SensitiveParameterValue), 'demo')
#1 {main}
thrown in /data02/virt59468/domeenid/www.lorents.ee/htdocs/rakendused/php4/examples/mysql-select-query.php on line 16