今日学习笔记
基于Python的Flask WEB框架实现后台权限管理系统
试图打开项目时遇到报错

推测在安装第三方包导致的出错,于是尝试使用cmd方式pip
成功
报错module 'time' has no attribute 'clock'
原因:
已经在新的版本中移除了。在Python3.8中更新了。“The function time.clock() has been removed, after having been deprecated since Python 3.3: use time.perf_counter() or time.process_time() instead, depending on your requirements, to have well-defined behavior. (Contributed by Matthias Bussonnier in bpo-36895.)”
成功

点击登陆遇到报错Access denied for user 'root@localhost' (using password:NO)
以及服务器过载

处理方法:
#1.停止mysql数据库 /etc/init.d/mysqld stop
#2.执行如下命令 mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
#3.使用root登录mysql数据库 mysql -u root mysql
#4.更新root密码 mysql> update user set authentication_string=password('root') where user='root';
#5.刷新权限 mysql> FLUSH PRIVILEGES;
#6.退出mysql mysql> quit
#7.重启mysql /etc/init.d/mysqld restart
#8.使用root用户重新登录mysql mysql -u root -p
Enter password: <输入新设的密码root>
MySql5.6操作时报错:You must SET PASSWORD before executing this statement:解决 mysql> SET PASSWORD = PASSWORD('123456'); Query OK, 0 rows affected (0.03 sec)
MySQL> create database roger; Query OK, 1 row affected (0.00 sec) 也就是用mysql>  SET PASSWORD = PASSWORD('123456');这句话重新设置一次密码!
                    
                
                
            
        
浙公网安备 33010602011771号