Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [PHP][MySQL]XAMPP nie potrafi się połączyć z bazą danych
Forum PHP.pl > Forum > Przedszkole
Zyga24
Witam,

Myślełem, że to fajna platforma, ale to jakieś nieporozumienie.
Łącząc się z bazą:
  1. $db_dane["hostname"] = ""
  2. $db_dane["user"] = "";
  3. $db_dane["password"] = "";
  4. $db_dane["db"] = "";
  5.  
  6.  
  7. $connection = @mysql_connect($db_dane['hostname'], $db_dane['user'], $db_dane['password']);
  8. @mysql_select_db($db_dane['db'])
  9. or die("Nie można połączyć");


Dostaje info, że nie można się połączyć.
Dokładnie ten sam kod odpalam z Webserwera i pięknie łączy się z bazą.
Co jest nie tak z tym xamppem, że nie potrałi nawet się z głupią bazą połączyć ?
CuteOne
Jasne.. wojny i głód na świecie to pewnie też wina "złego" oprogramowania ?

  1. $connection = mysql_connect($db_dane['hostname'], $db_dane['user'], $db_dane['password']) or die(mysql_error());
  2. mysql_select_db($db_dane['db'], $connection) or die(mysql_error());
Zyga24
Wciąż nie można się połączyć:
  1. Warning: mysql_connect(): mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.