ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'xxxxxx';
Windows 批处理脚本脚本连接mariadb时,配置数据库字符集
在通过命令行执行数据库脚本时,遇到错误:Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (gbk_chinese_ci,COERCIBLE) for operation '=' 解决办法: 可以通过 --default-character-set=u...
mariadb创建数据库时指定编码
在MariaDB中,创建数据库时,你可以指定数据库的字符编码(Character Set)和排序规则(Collation)。字符编码决定了数据库可以存储哪些字符,而排序规则则决定了字符的排序方式。这对于确保数据库能够正确处理...
centos mariadb 配置忽略大小写
编辑配置文件:vi /etc/my.cnf,在[mysqld]下面添加lower_case_table_names=1, 保存后,重启mariadb即可。 重启mariadb: systemctl restart mariadb
nginx https配置模板
server { listen 443 ssl http2 default_server; server_name dev.wujie.me; root /var/www/dev.wujie.me; index index.html index.htm index.php; #文件上传大小限制 必须要放在server...
Nginx PHP 配置模板
server { listen 80; root /var/www/www.example.com; # Add index.php to the list if you are using PHP index index.html index.htm index.php index.nginx-debian.html; server_name w...
wordpress之WP_Query函数
用法一、查询某一分类下的文章,代码如下: <?php $query = new WP_Query([ 'post_type' => 'product', // 文章类型是自定义类型 product 'posts_per_page' => 999, // 每页 999 条 ...
wordpress之wp_list_categories函数
该函数用来输出一个某个分类法下的分类列表,输出的是html格式,默认是 <li>...</li> $term = get_term_by('slug', 'software', 'product_category'); wp_list_categories([ 'taxonomy' ...
wordpress之the_xxx 系列的函数
该系列函数主要用于对单篇文章使用,获取单篇文章的相关信息,常用函数如下: 输出文章标题 <?php the_title() ?> 输出文章发布时间 <?php echo get_the_date( 'Y-m-d' ); ?> 输出文...
wordpress之sanitize_text_field函数
清理用户输入或者从数据库中获取的字符串。 检查是否合法的 UTF-8 字符,将 < 转换成 HTML 实体,去掉所有标签,删除所有换行符,占位符,以及额外的空格,去掉八位字节。 常用于后台meta box 保存内容...
