I am trying to connect to another VM ( from to get Data out of the MariaDB Database (joomla). So my Code is:

$link = mysqli_connect("", "user", "userpassword", "joomladb");

It works if I insert localhost instead of the IP adress and host it from the same server. I as well changed the bind_adress from both servers from to and expanded the max_allowed_packet to 512M.

I´m just trying to SELECT a single ID from one table of the joomladb.

But I only get the error message - MySQL Server has gone away - and a blank white sheet

So my question is: Does anyone have another idea what could go wrong in here? (Someone from Stack Overflow lead me to this site.) Thanks for any advice!


I´ve tried to add the Port as well:

$link = mysqli_connect("", "user", "userpassword", "joomladb");

$link = mysqli_connect("", "user", "userpassword", "joomladb");

nothing changed.


more code:

$link = mysqli_connect("", "user", "userpassword", "joomladb");
$sql_news = "SELECT introtext FROM jos_content WHERE id = '543'";
$result_query = mysqli_query($link, $sql_news);

if (mysqli_num_rows($result_query)) {
  while ($row = mysqli_fetch_assoc($result_query)) 
     $news = $row["introtext"];
  echo "0 results";
  • Welcome to JSE and thank you for your question. Please take our tour to familiarise yourself with this Stack Exchange community.
    – pe7er
    Apr 7 at 13:14


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.