I too am getting the "Error esttablishing database onnection" message.
I have successfully set up phpMyAdmin in a phpMyAdmin subdirectory of my root www direstory. I uploaded the unzipped WordPress files to that root directory. The other subdirectory established for mysql is www-data.
The working phpMyAdmin config file has the following $cfg['Servers'][$i] commands:
['host'] = 'localhost';
[extension'] = 'mysql';
['port'] = '3365';
['socket'] = '/home/users/.../www-data/tmp/mysql.sock';
['connect_type'] = 'socket';
['compress'] = false;
['auth_type'] = 'config';
['user'] = 'root';
['password'] = 'myPW';
I used phpMyAdmin to create a WordPress database and it created an empty WordPress subdirectory under www-data.
In my wp-config file I specified
What else do I need to get WP to talk to mysql?