bonucci Posted October 23, 2012 at 04:54 PM Report #480119 Posted October 23, 2012 at 04:54 PM (edited) Boas, não consigo fazer a conecção do site a base dados, as credenciais estão correctas e o erro que me aparece é o seguinte: "connection to database failedLost connection to MySQL server at 'reading initial communication packet', system error: 111" Config.php $con = mysql_connect("127.0.0.1","nomeuser","password"); if(!$con) { die("connection to database failed".mysql_error()); } /* selecting the database */ $dataselect = mysql_select_db("nomebasedados",$con); if(!$dataselect) { die("Database namelist not selected".mysql_error()); } Já aconteceu algo semelhante a alguem? Edited October 23, 2012 at 07:16 PM by bonucci
brunoais Posted October 23, 2012 at 05:39 PM Report #480123 Posted October 23, 2012 at 05:39 PM (edited) Antes da ajuda: Corrige o assunto do tópico. Está demasiado generalista. Mete um assunto que descreva melhor o problema que tens. Edited October 23, 2012 at 05:39 PM by brunoais "[Os jovens da actual geração]não lêem porque não envolve um telecomando que dê para mirar e atirar, não falam porque a trapalhice é rainha e o calão é rei" autor: thoga31 Life is a genetically transmitted disease, induced by sex, with death rate of 100%.
HappyHippyHippo Posted October 23, 2012 at 06:07 PM Report #480130 Posted October 23, 2012 at 06:07 PM isto não deverá ser o problema, mas começa a usar as funções mysqli_* IRC : sim, é algo que ainda existe >> #p@p Portugol Plus
bonucci Posted October 23, 2012 at 07:34 PM Author Report #480140 Posted October 23, 2012 at 07:34 PM Já está resolvido, estava a usar o localhost e na realidade o endereço era outro.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now