How do I display information from two different databases?

Good afternoon. Tell me, please. I need to get information from two different databases
There are 2 identical tables Have the same columns
name, id
$direct = '/connect.php';

require_once $direct;

$link = mysqli_connect($host, $user, $password, $database) 
 or die("Error" . mysqli_error($link));


$link1 = mysqli_connect($host1, $user1, $password1, $database1) 
 or die("Error" . mysqli_error($link1));


$query ="SELECT name FROM inner join ORDER BY id";

$result = mysqli_query($link, $query) or die("Error" . mysqli_error($link)); 


Error SELECT command denied to user
June 8th 19 at 17:23
1 answer
June 8th 19 at 17:25
Let the user, which are in the database, the right to SELECT query.
There is a law. If you remove the connection to the second database, then everything is fine. - sylvan.Ho commented on June 8th 19 at 17:28

Find more questions by tags PHPSQL