title: Firebase Database connection was forcefully killed by the server
body: <p>This is the error that I'm facing, I tried different fixes from the internet but nothing rly worked!
  I'm using flutter on android studio to build an app
  the Error is:</p>
  <blockquote>
  <p>Firebase Database connection was forcefully killed by the server. Will not attempt reconnect. Reason: Database lives in a different region. Please change your database URL to <a href="https://flutter-fp-default-rtdb.europe-west1.firebasedatabase.app" rel="nofollow noreferrer">https://flutter-fp-default-rtdb.europe-west1.firebasedatabase.app</a></p>
  </blockquote>
  <p>one of the codes I put related to it is</p>
  <p><code>DatabaseReference usersRef = FirebaseDatabase.instance.reference().child(&quot;users&quot;);</code></p>
  <p>and</p>
  <p>in another dart</p>
  <pre><code>final FirebaseAuth _firebaseAuth = FirebaseAuth.instance;
  
    void registerNewUser(BuildContext context) async
    {
      final User? firebaseUser = (await _firebaseAuth
          .createUserWithEmailAndPassword(
          email: emailTextEditingController.text,
          password: passwordTextEditingController.text
      ).catchError((errMsg){
        displayToastMessage(&quot;Error: &quot; + errMsg.toString(), context);
      })).user;
  
  if(firebaseUser != null) //user created
        {
          //save user info to datebase
        
  
        Map userDataMap = {
          &quot;name&quot;: nameTextEditingController.text.trim(),
          &quot;email&quot;: emailTextEditingController.text.trim(),
          &quot;phone&quot;: phoneTextEditingController.text.trim(),
        };
  
        usersRef.child(firebaseUser.uid).set(userDataMap);
  
        displayToastMessage(&quot;Congratulations, your account has been created!&quot;, context);
        Navigator.pushNamedAndRemoveUntil(context, MainScreen.idScreen, (route) =&gt; false);
  
        }
      else
        {
          // error occured - display error message
          displayToastMessage(&quot;New user has not been created! please try again later.&quot;, context);
        }
  </code></pre>
  <p>I also tried to update the json file, even though it has the right code it didnt work :(</p>
  <pre><code>{
    &quot;project_info&quot;: {
      &quot;project_number&quot;: &quot;80090510867&quot;,
      &quot;firebase_url&quot;: &quot;https://flutter-fp-default-rtdb.europe-west1.firebasedatabase.app&quot;,
      &quot;project_id&quot;: &quot;flutter-fp&quot;,
      &quot;storage_bucket&quot;: &quot;flutter-fp.appspot.com&quot;
    },
  </code></pre>
  <p>pls help :)</p>