Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP][MySQL]XAMPP nie potrafi się połączyć z bazą danych
Zyga24
post
Post #1





Grupa: Zarejestrowani
Postów: 11
Pomógł: 0
Dołączył: 2.09.2012

Ostrzeżenie: (0%)
-----


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ć ?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
CuteOne
post
Post #2





Grupa: Zarejestrowani
Postów: 2 958
Pomógł: 574
Dołączył: 23.09.2008
Skąd: wiesz, że tu jestem?

Ostrzeżenie: (0%)
-----


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());


Ten post edytował CuteOne 11.09.2012, 08:32:07
Go to the top of the page
+Quote Post
Zyga24
post
Post #3





Grupa: Zarejestrowani
Postów: 11
Pomógł: 0
Dołączył: 2.09.2012

Ostrzeżenie: (0%)
-----


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
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 4.10.2025 - 03:49