when my PHP page connect to mysql database, i get the following error;
I have installed MySQL 5.7.11. My PHP version is 7.0.2 installed with XAMPP. I have separately installed MySQL with MySQL Workbench.
I tried numerous solution in stackoverflow also. None of them worked; I checked the following phpinfo page to confirm "Loaded Configuration File"
Your all help is appreciated. Thanks!!!!
UPDATE !!!
After your solution, it connects to database. But I get this new error;
mysql
is not included in PHP 7+. You'll need to use the MySQLi
or PDO_MYSQL
api.
The php.net/mysql states:
This extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. Instead, the MySQLi or PDO_MySQL extension should be used.
You should also consider, if you haven't already, replacing MySQL v5.7 with MariaDB v10 (they use the same MySQLi/PDO_MySQL api).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.