Advertisement
Guest User

Untitled

a guest
Jul 29th, 2015
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. /** The name of the database for WordPress */
  2. define('DB_NAME', 'somedbname');
  3.  
  4. /** MySQL database username */
  5. define('DB_USER', 'someusername');
  6.  
  7. /** MySQL database password */
  8. define('DB_PASSWORD', 'somerandompassword');
  9.  
  10. WPDBNAME=somedbname
  11. WPDBUSER=somedbuser
  12. WPDBPASS=somerandompassword
  13.  
  14. WPDBNAME=`cat wp-config.php | grep DB_NAME | cut -d ' -f 4`
  15. WPDBUSER=`cat wp-config.php | grep DB_USER | cut -d ' -f 4`
  16. WPDBPASS=`cat wp-config.php | grep DB_PASSWORD | cut -d ' -f 4`
  17.  
  18. awk -F"[()']" '/^define/{printf "%s="%s"n", $3, $5;}' < foo.php
  19.  
  20. DB_NAME="somedbname"
  21. DB_USER="someusername"
  22. DB_PASSWORD="somerandompassword"
  23.  
  24. find . -name "wp-config.php" -print0 | xargs -0 -r grep -e "DB_NAME" -e "DB_USER" -e "DB_PASSWORD"
  25.  
  26. mysql -u `cat wp-config.php | grep DB_USER | cut -d ' -f 4` -p`cat wp-config.php | grep DB_PASSWORD | cut -d ' -f 4` -h `cat wp-config.php | grep DB_HOST | cut -d ' -f 4` `cat wp-config.php | grep DB_NAME | cut -d ' -f 4`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement