Jump to content

connect db


jagguy

Recommended Posts

I am trying to connect to a mysql database on a website (not localhost) and getting some problems (as listed in mysql forum).

I wonder have I connected corretly.

<?php

error_reporting(E_ALL);
    // some basic sanity checks

        //connect to the db
        $link = mysql_connect("jagguy.ej.am", "jagguy_root", " ")or die("Could not connect: " . mysql_error());
        // select our database
        mysql_select_db("jagguy_formdata") or die(mysql_error());
?>
Link to comment
https://forums.phpfreaks.com/topic/35485-connect-db/
Share on other sites

I believe you need to access command line mysql which I don't believe I have on this website ejam.

Warning: mysql_connect() [function.mysql-connect]: Host 'meiling.seraphimnetworks.com' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' in /home/jagguy/public_html/dbconnect.php on line 7
Could not connect: Host 'meiling.seraphimnetworks.com' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
Link to comment
https://forums.phpfreaks.com/topic/35485-connect-db/#findComment-167946
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.