Driver Exception PDO na remote serveri
- simeon
- Člen | 2
Zdravím,
mám takýto problém: Vyhadzuje mi:
Fatal error: Uncaught exception ‚PDOException‘ with message
‚SQLSTATE[HY000] [2005] Unknown MySQL server host
'mysql57.websupport.sk:3311‘ (2)' in
/nfsmnt/hosting1_1/d/e/de4b810f-9492–4d47–8586–3667152e00ae/nara-design.com/sub/najportal/vendor/nette/database/src/Database/Connection.php:68
Stack trace: #0
/nfsmnt/hosting1_1/d/e/de4b810f-9492–4d47–8586–3667152e00ae/nara-design.com/sub/najportal/vendor/nette/database/src/Database/Connection.php(68):
PDO->__construct(‚mysql:host=mysq…‘, ‚najportal‘, ‚password‘,
Array) #1
/nfsmnt/hosting1_1/d/e/de4b810f-9492–4d47–8586–3667152e00ae/nara-design.com/sub/najportal/vendor/nette/database/src/Database/Connection.php(116):
Nette\Database\Connection->connect() #2
/nfsmnt/hosting1_1/d/e/de4b810f-9492–4d47–8586–3667152e00ae/nara-design.com/sub/najportal/vendor/nette/database/src/Database/Structure.php(164):
Nette\Database\Connection->getSupplementalDriver() #3 [internal function]:
Nette\Database\Structure->loadStructure(NULL) #4
/nfsmnt/hosting1_1/d/e/de4b810f-9492–4d47–8586–3667152e in
/nfsmnt/hosting1_1/d/e/de4b810f-9492–4d47–8586–3667152e00ae/nara-design.com/sub/najportal/vendor/nette/database/src/Database/DriverException.php
on line 25
Link: http://najportal.nara-design.com/www/
Avšak napríklad /www/admin zobrazí, keď sa prihlásim, znova
exception.
Neviem, čo s tým, pretože na localhoste to išlo všetko v poriadku.
V config.local.neon som zmenil prihlasovacie údaje. Host server:port. Do db
som už pristupoval cez mysql_connect() a mysql_query(), takže existuje a sú
v nej dáta.
Server je od websupportu, je možné, že čosi nemám povolené, alebo na
čo som pri konfigurácii mohol zabudnúť?
Viete mi, prosím, poradiť?
- David Matějka
- Moderator | 6445
ten port musis uvest v DSN samostatne, napr
mysql:host=localhost;port=3307;dbname=testdb