Myluzh Blog

Strive to become a dream architect.

python获取计算机MAC地址

2022-4-24 myluzh Python

def get_mac(): macList = list(net_if_addrs().items()) macI = 0 macAll = "" while True: try: macName = macList[macI][0] macAdders = macList[macI][1][0][1] # macInfo = str(macName + " " + macAdders + " ") if validate_mac(macAdders): macAdders=macAdders.replace('-', ':') print(macName, macAdders) # macAll = macAll + macInfo macI = macI + 1 except: break ...

阅读全文>>

标签: python

评论(0) (385)

mysql 8.0开启远程访问

2022-4-19 myluzh MySQL

1、进入数据库 mysql -u root -p ‘原来的密码’      //进入数据库中 2、切换数据库 use mysql; 3、使用以下命令开启root用户远程访问权限: CREATE USER 'root'@'%' IDENTIFIED BY '你的密码'; GRANT ALL ON *.* TO 'root'@'%'; ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '你的密码'; 4、刷新权限 FLUSH PRIVILEGES;

阅读全文>>

标签: mysql8 远程访问

评论(0) (379)

VMware VMX格式转换成OVF模版

2022-4-14 myluzh VMware

VMware Workstation 7.0以上版本中有自带一个OVFTool.exe的工具 在VM安装路径下的\VMware\VMware OVF Tool\ovftool.exe cmd运行以下命令即可转换成ovf C:\Program Files\VMware\VMware OVF Tool\ovftool.exe "原文件路径\xxx.vmx" "目标路径\xxx.ovf"

阅读全文>>

标签: vmx转ovf

评论(0) (706)