|
|
|
|
|
|
|
#1 (permalink) |
|
Gast
Beiträge: n/a
|
Code:
<html>
<head>
<title>bestand</title>
</head>
<body>
<?php
$username = "mein_user_name";
$password = "xxx";
$hostname = "10.128.1.5:3306";
$dbh = mysql_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");
print "Connected to MySQL
";
mysql_close($dbh);
php?>
</body>
</html>
woran kann das liegen ? mit nem front-end komm ich ohne weiteres auf die datenbank drauf |
|
|
|
|
|
PHP Code Flüsterer
Registriert seit: 21.08.2005
Beiträge: 4682
PHP-Kenntnisse:
Fortgeschritten
|
|
|
|
#2 (permalink) |
|
Erfahrener Benutzer
Registriert seit: 21.05.2008
Beiträge: 2.150
![]() |
Fehlermeldung ... gut ....
Sinnvollefehlermeldung ... besser ... |
|
|
|
|
|
#3 (permalink) |
|
Gast
Beiträge: n/a
|
Code:
<html> <head> <title>bestand</title> </head> <body> <?php $username = "ktremmel"; $password = "xxx"; $hostname = "10.128.1.5:3306"; $query_text = "select * from artikel;" $dbh = mysql_connect($hostname, $username, $password) echo mysql_errno($dbh) . ": " . mysql_error($dbh). print "Connected to MySQL "; $result = mysql_query($query_text, $db_link); echo "result"; mysql_close($dbh); php?> </body> </html> |
|
|
|
#6 (permalink) | |
|
Gast
Beiträge: n/a
|
Zitat:
Vorsorglich: Daß das 10.* Netz im INet nicht geroutet wird, weißt Du hoffentlich. |
|
|
|
| Themen-Optionen | |
| Thema bewerten | |
|
|
Ähnliche Themen
|
||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| MSSQL und PHP, Fehler beim Connect! | duerov | PHP Tipps 2007 | 4 | 30.06.2006 11:58 |
| mysql connect | hmichi | Datenbanken | 8 | 28.05.2006 21:57 |
| Can't connect to local MySQL server through socket | zcmaster | Datenbanken | 0 | 17.02.2006 11:48 |
| Can't connect to local MySQL server through socket | scooter | Datenbanken | 1 | 15.01.2006 15:22 |
| [Erledigt] Can't connect to local MySQL server through socket | Datenbanken | 7 | 25.11.2005 15:35 | |
| not allowed to connect to this MySQL server | PHP Tipps 2005-2 | 2 | 23.09.2005 18:34 | |
| [Erledigt] Datenbank connect auf nicht llokalen Server | PHP-Fortgeschrittene | 5 | 16.09.2005 08:23 | |
| MySQL "Can't connect..." Fehler. | Datenbanken | 1 | 08.08.2005 14:25 | |
| mysql und connect | Datenbanken | 2 | 22.07.2005 10:14 | |
| Connect zu einer Oracle DB?? | druschba | PHP Tipps 2005-2 | 2 | 29.06.2005 16:11 |
| could not connect to MySQL | nixdorf | Datenbanken | 3 | 22.03.2005 13:10 |
| php connect zur db unter UNIX geht, über Apache nicht ... | PHP Tipps 2004-2 | 0 | 23.11.2004 19:52 | |
| connect() | stefan-miti | PHP Tipps 2004 | 6 | 25.09.2004 18:22 |
| connect() und pconnect() | PHP Tipps 2004 | 3 | 10.09.2004 16:35 | |
| ADODB - Connect ---> Geht plötzlich nicht mehr.... | votec-cougar | PHP-Fortgeschrittene | 0 | 06.09.2004 15:55 |

Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.