Access denied for user 'xxxxxxx'@'localhost' (using password: YES)

Hi all,
I have migrated my projects under Hoo.st my testing environment becouse they ensure that all will work well also the PDF export etc… .
Now I’ve deployed a project there and after the initial where SC ask for connection I got some problems that in other situation I never had.

I got the user and passwor like that:
Username: xxxxxxx
Password: m9Wv21Nqx7

I did an echo of connection parameter on two situation

On local
127.0.0.1:3306
User: root
Password:

On Hoo.st

Server: localhost:3306
User: xxxxxx
Password enc_nm_enc_v1D9XsDuBqDSBYHuXGHuBYZSNiDWrmVoF7HQBiZSFaHABYZMXGHgNKDkXeV5JeZura

As you can see the password change a lot from input to echo value

m9Wv21Nqx7 <—> enc_nm_enc_v1D9XsDuBqDSBYHuXGHuBYZSNiDWrmVoF7HQBiZSFaHABYZMXGHgNKDkXeV5JeZura

Now when I start to use my project I got lot of errors

Errore

mysql_connect(): Access denied for user ‘kfiveit’@‘localhost’ (using password: YES)
mysql_select_db() expects parameter 2 to be resource, boolean given
mysql_query(): Access denied for user ‘’@‘localhost’ (using password: NO)
mysql_query(): A link to the server could not be established
mysql_query(): Access denied for user ‘’@‘localhost’ (using password: NO)
mysql_query(): A link to the server could not be established
mysql_num_fields() expects parameter 1 to be resource, boolean given
mysql_num_fields() expects parameter 1 to be resource, boolean given
mysql_fetch_row() expects parameter 1 to be resource, boolean given

What can I do to avoid this blocking problem ??
Is there anybody that have yet this kind of issue ??

Many thank

I think that you need to get into contact with the support dept. of that hosting firm.

Hi Albert,
do you think that it would be a problem of mysql ?

I have had this type of errors before, but it was always due to wrong credentials, ip’s, ports etc. In your case you could try to use other MySQL connectiontypes (transactional, non-transactional or pdo) to see if the problem persists. But if this error occurs on your hosting party who claims that they know all about SC then they should easy be able to tell you what’s wrong. It could be a configuration problem.

Hi Giovanni

i thin it’s a mysql permission problem on DB. Check if user kfive has permission on database. Can you connect using phpmyadmin?

Hi and thanks to all,
the problem was connected to user password that as variable of SC [sc_glo_senha] as default is encoded.
To fix the problem apply

$userpwdsc = [sc_glo_senha];
$userpwd = sc_decode($userpwdsc);

Connection parameters
$server = [sc_glo_servidor];
$userdb =[sc_glo_usuario];
$userpwdsc = [sc_glo_senha];
$userpwd = sc_decode($userpwdsc);
$conn = mysql_connect($server, $userdb , $userpwd) or die(mysql_error());
$datab = [sc_glo_banco];

1 Like