lsvcam Posted August 16 Posted August 16 Hi, please allow remote access for my mysql-database (again). lsvcam.heliohost.us Database: lsvcam_webcamData User: lsvcam_webcamLSVdbUser Thanks a lot in advance. Quote
wolstech Posted August 16 Posted August 16 For mysql, you actually do it yourself. In plesk, edit the database user, and there's an option for remote access at the bottom below the permissions section. Quote
lsvcam Posted Monday at 12:03 PM Author Posted Monday at 12:03 PM Thanks, I already set this option to "Allow remote connections from any host" and also tried "Allow remote connections from". Both did not work. I still get the error message: Quote Fatal error: Uncaught mysqli_sql_exception: Access denied for user 'lsvcam_webcamLSVdbUser'@'www640.your-server.de' (using password: YES Code: $conn = new mysqli( "lsvcam.heliohost.us", "lsvcam_webcamLSVdbUser", "xxxxxx", "lsvcam_webcamData" ); if ($conn->connect_error) { die("❌ Verbindung fehlgeschlagen: " . $conn->connect_error); } else { echo "✅ Verbindung erfolgreich hergestellt!<br>"; }v In Plesk, my Database server is: Database server localhost:3306 (default for MariaDB, v10.5.27) Can I change that to "lsvcam.heliohost.us"? Quote
wolstech Posted Monday at 02:57 PM Posted Monday at 02:57 PM You should be using johnny.heliohost.org as the database server hostname. Also, the error you're getting makes me think you have the DB settings wrong somewhere else in your code, as it's mentioning 'lsvcam_webcamLSVdbUser'@'www640.your-server.de' If this were set up correctly on your end, that bold part should be showing johnny.heliohost.org. Quote
MoneyBroz Posted 19 hours ago Posted 19 hours ago your-server.de is the default hostname for websites hosted on Hetzner so it is definitely incorrect Quote
lsvcam Posted 4 hours ago Author Posted 4 hours ago Thank you. I just tried several things but was not able to connect. <?php error_reporting(E_ALL); ini_set("display_errors", 1); echo "<html><head></head><body>"; #$db_host = '64.62.151.106'; #$db_host = 'lsvcam.heliohost.us'; $db_host = 'johnny.heliohost.org'; $db_user = 'lsvcam_webcamLSVdbUser'; $db_pass = '-----'; $db_database = 'lsvcam_webcamData'; $db_port = '3306'; $conn = mysqli_connect($db_host,$db_user,$db_pass,$db_database,$db_port); // Verbindung prüfen if ($conn->connect_error) { die("❌ Verbindung fehlgeschlagen: " . $conn->connect_error); } else { echo "✅ Verbindung erfolgreich hergestellt!<br>"; } // Test-Query $result = $conn->query("SHOW TABLES"); if ($result) { echo "Gefundene Tabellen:<br>"; while ($row = $result->fetch_array()) { echo $row[0] . "<br>"; } } else { echo "❌ Fehler bei Test-Query: " . $conn->error; } $conn->close(); echo "</body></html>"; ?> For all "$db_host", I got the same error message. in Plesk -> Databases -> User Management -> USER -> Access Control: Allow remote connections from any host I get the same error when trying to add the IP or www640.your-server.de Acc. to chatgpt, I should ask this Quote "The MySQL port 3306 of johnny.heliohost.org is accessible from my Hetzner server (IP 168.119.26.120, hostname www640.your-server.de) ✅. Nevertheless, I receive Access denied for user ‘lsvcam_webcamLSVdbUser’@'www640.your-server.de'. This means that my user is not enabled for host 168.119.26.120. Please also create the user as ‘lsvcam_webcamLSVdbUser’@'168.119.26.120' (or, if necessary, ‘lsvcam_webcamLSVdbUser’@'%') and assign the appropriate rights to the lsvcam_webcamData database. Example: GRANT ALL PRIVILEGES ON lsvcam_webcamData.* TO ‘lsvcam_webcamLSVdbUser’@'168.119.26.120' IDENTIFIED BY ‘myPassword’; FLUSH PRIVILEGES; ```” Any futher ideas? Quote
wolstech Posted 2 hours ago Posted 2 hours ago The only other thing it could be is a password issue. I assume you already tried setting a new password for the database user? Also, maybe Krydos has some insight on this...the settings are correct on your end and in Plesk. 1 Quote
lsvcam Posted 1 hour ago Author Posted 1 hour ago Thank you! It was a password issue. First I created a ew user, which worked fine. After that, I changes the password on the existing user and it works, too. Thanks a lot for your support. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.