Thinkphp更新到了6.0.9,我升级后发现原来运行正常的代码会报类似这样的错误
think\db\baseQuery::jsonResult(): Argument #1 ($result) must be of type array.....
发现是因为升级过程中,
topthink/think-orm 从2.0.44升级到了2.0.45,将期版本降级至2.0.44,问题就可以解决。
如果已经升级了应该怎么降级呢?
将composer.json文件中的
"topthink/think-orm": "^2.0"
改为
"topthink/think-orm": "2.0.44"
然后运行
composer update
即可。MySQL 的下载地址:MySQL :: Download MySQL Community Server
得到的压缩包解压后,打开命令行提示符的管理员模式。
安装mysql服务:
D:\Server\MySQL\mysql-8.0.27-winx64\bin>mysqld --install
Service successfully installed.
初始化mysql
D:\Server\MySQL\mysql-8.0.27-winx64\bin>mysqld --initialize --console
2021-10-27T12:44:56.110412Z 0 [System] [MY-013169] [Server] D:\Server\MySQL\mysql-8.0.27-winx64\bin\mysqld.exe (mysqld 8.0.27) initializing of server in progress as process 9472
2021-10-27T12:44:56.441555Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-10-27T12:45:04.292406Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-10-27T12:45:16.275942Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1 is enabled for channel mysql_main
2021-10-27T12:45:16.276340Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1.1 is enabled for channel mysql_main
2021-10-27T12:45:16.423013Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: <H2MriERvPHB
root用户的初始密码是:<H2MriERvPHB
使用初始密码登录root用户
D:\Server\MySQL\mysql-8.0.27-winx64\bin>mysql -uroot -p
Enter password: ************
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.27
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
需要先修改密码,同时修改mysql8的密码验证方式,否则第三方工具可能连接不上
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456789';
Query OK, 0 rows affected (0.12 sec)<br/>
刷新权限
mysql> flush privileges;
Query OK, 0 rows affected (0.11 sec)
好了,可以链接了
--------------------------------------------------
添加一个新的管理员用户,需要用两行语句实现:
首先是创建用户:
create user 'user'@'localhost' identified with mysql_native_password by '12345678';
然后再赋予仅限:
grant all on *.* to 'user'@'localhost' with grant option;
更新一下:
flush privileges;
这样就可以用新的用户进行登了。
enjoy!
为了记录我的大学生活点滴,大学生活从97年开始,98年有了网站,一开始使用的都是免费空间,功能受限,还要看服务商的脸色,结果就是到处搬家,内容丢了一次又一次。后来申请了自己的域名,不再使用二级域名了。网站中间暂停了几年,现在在 阿里云 买了服务器,重新把内容一点点找回来,再慢慢丰富吧。希望以后不再搬家,希望这里就是永远。
PS: 现在正在完成要求的相关备案手续,希望能顺利通过!
对于上班族而言,A4纸是我们经常接触的办公用品之一,无论是用于打印文件,还是用于记录一些内容,都少不了。不过,你是否有过这样的疑问,A4纸为什么被命名为“A4”呢?
A4纸,这是一个国际通用的标准,纸张实际尺寸为210mm×297mm,最早是在1922年被纳入为通用标准。目前,该标准是由国际标准化组织,也就是我们常见的“ISO”组织定义的(International Organization for Standardization),即ISO 216。
知识点:International Organization for Standardization的缩写为什么不是IOS,而是ISO?International Organization for Standardization是英文,而ISO是希腊文字,表示“相等的”。
ISO 216定义了A、B、C三组纸张尺寸。
A组纸张两边比值为√2:1(根号2比1),即1.414比1,A0被定义为1平方米,为841×1189mm。
A1纸张则是A0纸张对折,即594×841mm;
A2为420×594mm;
A3为297×420mm;
A4为210×297mm;
……
A10为26×37mm。
B组纸张尺寸是对应编号相同A组纸张,及小一号编号A组纸张的几何平均,即B0是A0和A1的几何平均,至于什么是“几何平均”,请大家问度娘吧。
C组纸张尺寸是对应编号相同A组纸张,与B组纸张的几何平均,即C0是A0和B0的几何平均。
另外,再给大家普及一个小知识:我们有时会听到(看到)“70克纸,80克纸”之类的标识,这是代表“1平米纸张的重量”,一般情况下,克数越大,纸张越厚。
转载自 太平洋电脑网 https://office.pconline.com.cn/1457/14577604.html