Uncaught Error: Call to undefined function mysql_connect() – WordPress installation


Trying to install wordpress without xamp on my local machine. Version info:

WordPress: 5.2.3 PHP: 7.3.9 Apache: 2.4.41  

When accessing this url -http://localhost:8080/wordpress/wp-admin/install.php, I see the following in wordpress logs:

[16-Sep-2019 18:47:34 UTC] PHP Fatal error:  Uncaught Error: Call to  undefined function mysql_connect() in C:\apps\httpd-2.4.41-win64-  VS16\Apache24\htdocs\wordpress\wp-includes\wp-db.php:1643 

I tried the solutions available online but I still see the error.

Solutions I tried so far:

Add the following to my wp-config.php:

define( 'WP_USE_EXT_MYSQL', true); 

Added following to php.ini:

extension_dir = "ext" extension=php_mysqli.dll 

This is my phpinfo:

Server API  Apache 2.0 Handler Virtual Directory Support   enabled Configuration File (php.ini) Path   C:\windows Loaded Configuration File   C:\apps\php-7.3.9\php.ini Scan this dir for additional .ini files (none) Additional .ini files parsed    (none) PHP API 20180731 PHP Extension   20180731 Zend Extension  320180731 Zend Extension Build    API320180731,TS,VC15 PHP Extension Build API20180731,TS,VC15 Debug Build no Thread Safety   enabled Thread API  Windows Threads Zend Signal Handling    disabled Zend Memory Manager enabled Zend Multibyte Support  disabled IPv6 Support    enabled DTrace Support  disabled Registered PHP Streams  php, file, glob, data, http, ftp, zip, compress.zlib, phar Registered Stream Socket Transports tcp, udp Registered Stream Filters   convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, zlib.*