Home

Add an Admin User to the WordPress Database via MariaDB

  • Category: 電腦相關
  • Last Updated: Monday, 01 May 2017 23:30
  • Published: Monday, 01 May 2017 23:14
  • Written by sam

 為了要測試搬移的網站是否成功並檢查在WP的Admin後臺是否正常

手邊又沒有原始的帳、密,改又不方便

只好自己新增一下帳戶

先登入

mysql -uroot -p

再新增自己的帳號進去(記得依現有環境替換值)

INSERT INTO `YourDB`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('2', 'sam', MD5('PW'), 'sam', 'This email address is being protected from spambots. You need JavaScript enabled to view it.', 'http://boredom.gotdns.com/', '2011-06-07 00:00:00', '', '0', 'sam');
INSERT INTO `YourDB`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '2', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');
INSERT INTO `YourDB`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '2', 'wp_user_level', '10');

 

ubnt edgerouter lite

  • Category: 電腦相關
  • Last Updated: Thursday, 27 April 2017 22:33
  • Published: Thursday, 27 April 2017 22:22
  • Written by sam

好久之前買的設備

自從設定好之後,就沒有再重開過了(除了把它從前公司拎回家…)

想不到今天家裡斷電

復電後,正常的上網,到睡覺前

才發現Vmware Host 都沒有pppoe出去

原來是之前改的 pppoe-relay 沒有起來

sudo pppoe-relay -h
sudo pppoe-relay -S eth0 -C br0

這樣就完成了