Ubuntu 18.04 WordPress - PHP Issue


My client website was working well on managed hosting (Php7.1 - Litespeed). But I migrated it to cloud VPS.

I have installed OLS and also lsphp73 via below command:
sudo apt install lsphp73-* -y

It is installed and configured successfully. Also, website files and its database are moved to the vps well. But I see below error after moving WP to the cloud VPS.
site is experiencing technical difficulties.

 [STDERR] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/bilduswp/example.com/html/wp-includes/wp-db.php:1643
Stack trace:
#0 /home/bilduswp/example.com/html/wp-includes/wp-db.php(639): wpdb->db_connect()
#1 /home/bilduswp/example.com/html/wp-includes/load.php(427): wpdb->__construct('secret-dbname', 'example-pass...', 'example', 'localhost')
#2 /home/bilduswp/example.com/html/wp-settings.php(120): require_wp_db()
#3 /home/bilduswp/example.com/html/wp-config.php(90): require_once('/home/bilduswp/...')
#4 /home/bilduswp/example.com/html/wp-load.php(37): require_once('/home/bilduswp/...')
#5 /home/bilduswp/example.com/html/wp-blog-header.php(13): require_once('/home/bilduswp/...')
#6 /home/bilduswp/example.com/html/index.php(17): require('/home/bilduswp/...')
#7 {main}
thrown in /home/bilduswp/example.com/html/wp-includes/wp-db.php on line 1643
I tried everything to fix it but I couldn't. What is the issue? Can you please help me?
Can you check phpinfo page see if database module has loaded?

Thank you for reply. I tried;

1- One click OpenLiteSpeed installation with WP on Ubuntu 16.04 & 18.04
2- or install OLS from repo on Ubuntu
3- or install OLS from source on Ubuntu

Unfortunately, none of them are working. (VPS company: Vultr) The same error occurred: site is experiencing technical difficulties. As you say the database module has not loaded.

Anyway, I installed OLS and WordPress by following the same installation methods on CENTOS7. Now it is working well with lsphp73.

Thank you!
Best regards.