How to connect to local mysql database from php

Hello everyone Please help me. I can’t connect the database to my site. I’m new to programming. I have a php module.config file, help me write the data correctly
this is from an old project. The database was in phpmyadmin

<?
	defined('ROOT_DIR') or header('HTTP/1.1 404 Not Found') or header('Status: 404 Not Found') or die;

	return [
		'db' => [
		'connect' => (DEBUG ? [getenv('MYSQL_HOST'), getenv('MYSQL_NAME'), getenv('MYSQL_USER'), getenv('MYSQL_PASS')] : ['localhost', 'u1672917_default', 'u1672917_default', '111'])	
		],
		'app' => [
			'secret' => '___',
			'route' => [
				[
					['/cron/', 'cron:index'],
					['/sync/', 'site/service:syncWithContract'],
					['/sync/:tx/', 'site/service:syncWithContract'],
					['/badbrowser/', function($App) { $App->error(418); }],
					['/autotranslate/', function($App) { module('lang')->translateAllKeysForAllLangs(); }],
					['/partners/info/:id/', 'site/partners:getPartnerInfo'],
					['*', 'lang:main'],
					['*', 'auth:main'],
					['*', 'site/layout:main'],
					['/', 'site/main:index'],
					['/auth/', 'site/auth:index'],
					['/auth/logout/', 'site/auth:logout'],
					['/auth/getid/:addr/', 'site/auth:getID'],
					['/a/:id/', 'site/auth:rlink'],
					['/partners/:level/', 'site/partners:index'],
					['/uplines/', 'site/uplines:index'],
					['/lost/', 'site/lost:index'],
				]
			]
		],
		'cron' => [
			'task' => [
				[
					['* * * * *', 'server/service:syncWithContract']
				]
			]
		],
		'moralis' => [
			'network' => 'mainnet',
			'key' => '___'
		],
		'site/service' => [
			'contract' => '0x45e363e3a4e28b5bb195eebc41bd70df8952d9a6',
			'contract_deploy_block' => 18560291
		]
	];

Hello Moralis uses MongoDB.

You can use the PHP driver to connect to it.