随笔分类 - Mysql
摘要:原因:mysql8默认的使用密码认证方式不一样,mysql8.0默认使用caching_sha2_password,但是之前版本都是使用mysql_native_password 解决方案:将密码认证方式caching_sha2_password修改为mysql_native_password my
阅读全文
摘要:SQL结构化查询语言包含6个部分。SQL(Structure Query Language)语言是数据库的核心语言。 1).数据定义语言 DDL: Data Definition Language (隐形提交的,不用commit,不能rollback) 常用的有CREATE和DROP,用于在数据库中
阅读全文
摘要:Apache安装:https://www.cnblogs.com/Wtingting/p/13600695.htmlPHP安装:https://www.cnblogs.com/Wtingting/p/14040916.htmlMySQL安装:https://www.cnblogs.com/Wting
阅读全文
摘要:下载 https://www.mysql.com/downloads/1.以管理员身份打开命令行2.安装MySQL服务 cd C:\software\zdyhj\mysql-8.0.22-winx64\bin mysqld --install 3.初始化MySQL,产生一个随机密码 mysqld -
阅读全文
摘要:MySQL重启和查看状态 停止:service mysqld stop 开启:service mysqld start 重启:service mysqld restart 查看状态:service mysqld status
阅读全文
摘要:当查询出来的字符乱码时。 方法1:查询前设置 mysql> show variables like'%char%'; + + +| Variable_name | Value |+ + +| character_set_client | latin1 || character_set_connect
阅读全文
摘要:1、修改表字段类型 alter table users_log modify column code smallint(4); 2、增加表字段 alter table users_log add error_code mediumint(5); ALTER TABLE 表明 add 字段名称 类型(
阅读全文
摘要:binary:强制区分大小写 regexp:正则匹配 例:查询表users中username字段中存在大写字母的个数 select count(*) from users where binary username regexp '[A-Z]';
阅读全文
摘要:CONCAT(str1, str2):字符连接函数 UPPER(str):将字符串改为大写字母 LOWER(str):将字符串改为小写字母 LENGTH(str):判定字符串长度 SUBSTRING(str, a, b):提取字段中的一段,从字符串str的第a位开始提取,提取b个字符 LEFT(st
阅读全文

浙公网安备 33010602011771号