原因:
1:没有客户端配置字符集
2:客户端字符集跟服务端字符集不一致
解决:
打开plsql 帮助-支持信息-找到如下图片
查看服务器端字符集
Select *from V$NLS_PARAMETERS where PARAMETER='NLS_CHARACTERSET';
Select USERENV ('LANGUAGE' ) f...
--查看所有用户的连接数
select username,count(username) from v$session where username is not null group by username;
--查看用户会话的SID
select username,sid,serial# from v$session where u...
一:创建用户及更改用户的密码
语法:create user 用户名 identified by 密码;
SQL> create user zhangsong identified by 123456;
语法:alter user 用户名 identified by 密码;
SQL> alter user zhangsong ...
pg数据库主备安装(异步同步)
主库配置:
1:在主服务器安装PostgreSQL,主服务器初始化并启动PostgreSQL并作如下配置。
# su - postgres
$ pg_ctl start
$ psql
2:主PostgreSQL上,创建备份用户,并设置权限:
postgres=# create user standby_u...
\l # 查看所有数据库
\c # 切换数据库
\di # 查看索引
\dt # 查看表
\ds # 查看序列
\q # 推出
\timing on # 开机sql查询时间
\dns # 查看schema
\du # 查看用户
$ ps -ef|grep postgres
$ psql -Upostgres -d...
突然发现mysql登录不上了。
service mysqld restart先包正确再报失败
报的错误就是:
# service mysqld restart
停止 mysqld:
Another MySQL daemon already runn...
下载地址:https://www.postgresql.org/ftp/source/
编译安装
设置主机名
hostnamectl set-hostname pg01
PostgreSQL编译安装
1:安装必要工具包 readline-devel、zlib-devel、gcc 支持
# yum install readline-dev...
Warning: World-writable config file '/home/mysql-5.7.21/my.cnf' is ignored.
今天在升级mysql时发现启动和关闭时都有告警。
my.cnf配置文件配置的端口不是3306,配置文件重启并没有生效。
经过反复排查和询问,最终知道问题所在:mysql担心这种文件被其他...
为什么要写一边5.7.21的。因为mysql5.7.5以后编译都需要用到boost具体是什么自行百度。我也不是太明白。
正文开始:
一:安装编译开发环境
yum -y install gcc gcc-c++ ncurses ncurses-devel cmake
二:添加mysql禁止登录的用户及目录规划
# groupadd mysql...