分类: mysql
Mysql结束正在进行的SQL
1、show full processlist 查询正在执行的进程
2、通过kill 进程ID结束命令
Shell
kill 209710
1
……
MySQL查询数据库中的表占用空间的大小
1、查看指定数据库中各表占用空间的大小
Shell
select
table_schema as '数据库',
table_name as '表名',
table_rows as ……
Yum源安装MariaDB
使用官网发布的Yum源,安装MariaDB,减少编译安装的配置及后期维护成本。让管理更加简便。
官网:https://mariadb.org/
Yum配置链接:https://downloads.maria……
创建UTF-8的Mysql数据库
一、创建数据库
1. 创建UTF8编码数据库
PgSQL
CREATE DATABASE db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
……
MariaDB for Python
一 、安装MySQL-python
Shell
yum -y install MySQL-python
1
yum -y install MySQL-python
……
清空mysql表数据
Shell
delete from 表名;
truncate table 表名;
12
delete from 表名;truncate table 表名;
……
Centos 6.5 安装 mysql 5.7
下载 mysql57-community-release-el6-9.noarch.rpm及mysql-community-server-5.7.17-1.el6.x86_64.rpm两个软件包
1.安装mysql57-community-release-el6-9.noar……
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
在mysql 5.7 中,进入mysql执行操作时 ,出现以下提示
Shell
mysql> select version();
ERROR 1820 (HY000): You must reset your……
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
Shell
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';
ERROR 1819 (HY000): Your password does not sati……
libnuma.so.1()(64bit) is needed by mysql-community-server-5.7.17-1.el6.x86_64
Shell
[root@play ~]# rpm -ivh mysql-community-server-5.7.17-1.el6.x86_64.rpm
error: Failed dependencies:
libnuma.so.1()(……