Centos7上,对MySQL5.7开启远程连接. 1.修改/etc/my.cnf [mysqld] validate_password=off 2.命令行进入mysql use mysql; GRANT ALL ON *.* TO username@'%' IDENTIFIED BY 'password' WITH GRANT OPTION; flush privileges;//重要 3.与防火墙有关 firewall-cmd --zone=public --add-port=3306/tc
需求:Python实现三次密码验证,每次验证结果需要提示,三次验证不通过需要单独提示 代码如下: user = '张无忌' password = '12345678' confirm_flag = False for i in range(0, 3): user_input = input('user:') password_input = input('password:') if user_input == user and password_input == password: print
#英文字串首字母改为大写 st = "string" St = st[0].upper() + st[1:] 2016-10-22 后来了解到 python 内部有相关实现,感觉 python 好贴心~~~ >>> "hehe he hehe".capitalize() 'Hehe he hehe' >>> "hehe he hehe".title() 'Hehe He Hehe'