Guest User

Untitled

a guest
Jun 25th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. $host = "myip";
  2. $user = "root";
  3. $pass = "";
  4. $db = "mydatabase";
  5.  
  6. mysql_connect($host, $user, $pass);
  7. mysql_select_db($db);
  8. $on = mysql_fetch_row(mysql_query("SELECT COUNT(online) FROM characters WHERE online=1"));
  9. echo "<br>Online: $on[0]<br><br>";
  10.  
  11. Warning: mysql_connect() [function.mysql-connect]: Host 'myip' is not allowed to connect to this MySQL server in * on line 46
  12.  
  13. Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in * on line 48
  14.  
  15. Online:
  16.  
  17. grant all privileges on mydatabase.*
  18. to youruser@'your_ip_address'
  19. identified by 'your_password';
  20.  
  21. flush privileges;
Add Comment
Please, Sign In to add comment