Guest User

Untitled

a guest
Dec 28th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. mysql> SELECT User,Host FROM mysql.user;
  2.  
  3. +-------+--------------+------------+
  4. | User | Host | Grant_priv |
  5. +-------+--------------+------------+
  6. | root | localhost | Y |
  7. | root | dev-db01 | Y |
  8. | root | 127.0.0.1 | Y |
  9. | root | ::1 | Y |
  10. | | localhost | N |
  11. | | dev-db01 | N |
  12. | admin | % | N |
  13. | admin | localhost | N |
  14. | admin | xx.xxx.x.xxx | N |
  15. +-------+--------------+------------+
  16.  
  17. mysql> GRANT ALL PRIVILEGES ON *.* TO 'admin'@'xx.xxx.x.xxx' WITH GRANT OPTION;
  18.  
  19. mysql> GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION;
  20.  
  21. mysql> GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' WITH GRANT OPTION;
  22.  
  23. mysql> FLUSH PRIVILEGES;
  24.  
  25. telnet xx.xxx.x.xx 3306
  26.  
  27. Trying xx.xxx.x.xx...
  28. Connected to xx.xxx.x.xx.
  29. Escape character is '^]'.
  30. EHost 'xx.xxx.x.xx' is not allowed to connect to this MySQL serverConnection closed by foreign host.
  31.  
  32. sudo vi app/config/parameters.yml
  33. parameters:
  34. database_driver: pdo_mysql
  35. database_host: xx.xxx.x.xx
  36. database_port: 3306
  37. database_name: appdatabasename
  38. database_user: admin
  39. database_password: ~
  40.  
  41. mysql> update db set Host='xx.xxx.x.xxx' where Db='placeholder_db';
  42. mysql> update user set Host='xx.xxx.x.xxx' where user='placeholder_user';
Add Comment
Please, Sign In to add comment