打开 front 出现
1251- Client does not support authentication protocol
的错误原因:密码机制改变
参考:navicat 连接 mysql 出现Client does not support authentication protocol requested by servernet start mysql 启动无效的解决办法
参考:net start mysql启动无效的解决办法
办法:以管理员身份运行
①启动:在运行框内输入:net start mysql80
②关闭:在运行内输入:net stop mysql80win10服务打开方式
安装和卸载mysql for windows
安装:在win10上安装mysql数据库
卸载:控制面板
创建本地用户
报错42000
create user 'psh'@'localhost' identified by '1234';
grant select privileges on *.* to 'psh'@'localhost';
数据库远程连接
- 创建用户
CREATE USER 'test'@'%' IDENTIFIED BY '123';
- 为用户指定数据库
GRANT SELECT, INSERT, UPDATE, DELETE ON test1.* TO 'test11'@'%';
数据库常用指令
- 查询记录总条数
select count(*) from dd_comment;
- 删除所有记录
truncate table dd_list;
- 查询ID在第几行
select count(*)+1 from dd_list where id < 23524155;