查找wordpress数据库密码

查找mariadb数据库密码

查找wp-config.php这个文件,找到password就可以

# find -name wp-config.php
./var/www/html/wordpress/wp-config.php
# vi ./var/www/html/wordpress/wp-config.php

while用法

When condition is true, which include the result(true or false) of operator like 'not equal(!=)' or 'less than(<)'or 'greater than or equal to(>=)', the statement after colon will be executed.

When we use function input, the function will return string type, so if we want compare result with number, we can use str() to convert number to string and int() to convert string to int.

message = input('if you input 0,then everthing is over')
i = 1
while message != str(0) and i <=10 :
    print(str(i)+' '+message)
    i +=1

cv2.destroyAllWindows()出错

Jupyter's error can not be solved immediately, however when I run the script in terminal, error message is here:

.../Study/learningOC[15:52]python3 cameraFrames.py
Showing camera feed. Click window or press any key to stop.
Traceback (most recent call last):
  File "...Study/learningOC/cameraFrames.py", line 19, in <module>
    cv2.destroyAllWindows('MyWindow')
SystemError: <built-in function destroyAllWindows> returned NULL without setting an error

Therefore I check the demo code:

import cv2

clicked = False
def onMouse(event, x, y, flags, param):
    global clicked
    if event == cv2.EVENT_LBUTTONUP:
        clicked = True

cameraCapture = cv2.VideoCapture(0)
cv2.namedWindow('MyWindow')
cv2.setMouseCallback('MyWindow', onMouse)

print('Showing camera feed. Click window or press any key to stop.')
success, frame = cameraCapture.read()
while success and cv2.waitKey(1) == -1 and not clicked:
    cv2.imshow('MyWindow',frame)
    success, frame = cameraCapture.read()

#cv2.destroyAllWindows('MyWindow')
cv2.destroyAllWindows()
cameraCapture.release()

After deleting the arguments 'MyWidows' in destroyAllWindows, the script is running well.

轻松解决PHP8没有mysql插件问题

修复好info.php问题后,安装wordpress,创建数据库,修改wp-config.php,都很顺利,但是最后一步,进入浏览器后,出现下面告警
‘Your PHP Installation Appears to Be Missing the MySQL Extension Which Is Required by WordPress’

下面的网站虽然有一定参考意义,但是帮不了我。
方案1 How to Fix

还是靠自力更生,当然也参考方案2,通过非常简单的办法解决了问题。
直接sudo安装php8.0-mysqlnd即可

root@MDaliyun / # apt-get install php8.0-mysqlnd

Screen Shot 2021-01-24 at 11.16.37 PM

然后重新启动服务器

root@MDaliyun / # reboot

方案2 How To Fix "Your PHP Installation Appears To Be Missing The MySQL Extension Which Is Required By WordPress"