Ich habe MySQL-Datenbank in Shared-Hosting, dass in "remote MySQL" mit %
definiert in einem Cpanelmysql ERROR 2003 [HY000] - Wenn ich versuche, auf Remote-MySQL zu verbinden
Und ich innerhalb CMD eingeben :
C:\xampp\mysql\bin>mysql -u SiteName_username -p pass_of_mysql -h srv3.linuxisrael.co.il
I ENTER drücken
Enter password :
I ENTER drücken
P.S - It's right to press here ENTER ?
I do not have a password in MySQL installed on my computer
und ich bekomme:
mysql error 2003 (hy000) Can't connect to MySQl server on 'srv3.linuxisrael.co.il' (10060 "Unknown error")
Und in Laravel 5.1 i diesen Fehler:
PDOException in Connector.php line 55:
SQLSTATE[HY000] [2002] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
es so konfiguriert ist:
env-Datei:
APP_ENV=local
APP_DEBUG=true
APP_KEY= ...........
DB_HOST=srv3.linuxisrael.co.il
DB_DATABASE= name_of_my_database
DB_USERNAME=name_of_database_username
DB_PASSWORD=password_of_the_username
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
routes.php:
use App\User;
Route::get('/', function(){
User::create(['first_name' => 'moti']);
return view('welcome');
});
Wie kann ich MySQL verbinden?
ich durch Laravel anschließen möchten Aber ich sehe, dass es nicht für mich selbst nicht funktioniert, wenn ich über die CMD
versuchen Was ist die Lösung?
vielen Dank!
Es scheint, als könnte eine Firewall MySQL-Verbindungen zum Hosting-Server blockieren. – Barmar
Ich glaube nicht. Sie sagten mir, dass es kein Problem gibt, aus der Ferne zu verbinden Kundendienst –
Was sehen Sie, wenn Sie 'telnet srv3.linuxisrael.co.il 3306' tun? – Barmar