
linux
娜然
横推八百无对手,轩辕重出武圣人
展开
-
ERROR 1064 (42000): You have an error in your SQL syntax;
今天在mysql执行一个sql语句,报错:mysql> selectsum(xxxx) from xxxx wheredm='dbm' andDATE_FORMAT(sj,'%Y-%m')=DATE_FORMAT('sj$','%Y-%m');ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version fo...原创 2021-11-09 15:59:59 · 1800 阅读 · 0 评论 -
is not allowed to connect to this MySQL serverConnection closed by foreign host.
telnet一个mysql服务器:# telnet 192.168.xx.xx3306Trying 192.168.xx.xx...Connected to 192.168.xx.xx.Escape character is '^]'.BHost '100.xx.xx.xx' is not allowed to connect to this MySQL serverConnection closed by foreign host.可以ping通这个服务器,但是不能telnet通3306.原创 2020-07-31 11:18:04 · 1980 阅读 · 0 评论 -
已拒绝x11转移申请
环境:linux centos 7.8 xmanager的xstart连接linux的时候,报错解决方法:yum install gdmyum install xtermyum install xorg-x11-xauth修改文件/etc/ssh/sshd_config加上:XAuthLocation /usr/bin/xauth #系统默认是在/usr/X11R6/bin/xauth中找xathu的,但是xauth程序是在/usr/bin/xauthX11F...原创 2020-07-29 10:37:00 · 3149 阅读 · 0 评论 -
useradd: cannot open /etc/passwd
系统环境:linux centos7.8操作:创建用户报错:useradd: cannot open /etc/passwd解决过程:查看这个文件的属性:# lsattr /etc/passwd----i----------- /etc/passwd发现有i属性去掉这个属性:# chattr -i /etc/passwd然后这个文件可以写了,但是还有几个文件不能写,一样的道理,都去掉i权限,就可以顺利创建成功了。分析:i权限是什么呢?文件权限除了r、w、x外还原创 2020-07-10 15:01:17 · 9743 阅读 · 0 评论 -
利用sed实现在shell脚本中更改文件某一行的内容
需求:要在shell中更改某文件的固定的第几行的内容实现:sed -n -e "41p" $FILE1 ---查看文件1的41行的内容sed -n -e "62p" $FILE1sed -n -e "85p" $FILE1sed -n -e "28p" $FILE2 sed -i "41c${CON1}" $FILE1 ---将文件1的第41行更改为con1变量...原创 2018-07-25 15:36:17 · 17442 阅读 · 0 评论 -
Permission denied, please try again.
linux centos6.5当从一台机器执行scp的时候,报错:Permission denied, please try again.报错的消息是没有权限,密码应该是正确的,也可以得到验证。那么怎么会没有权限呢?我用的不是root用户,并且root用户也应该是有权限的。查看服务器端的日志文件/var/log/secure,当输入密码后,报错信息如下:sshd[279原创 2016-08-19 14:53:25 · 7144 阅读 · 0 评论 -
/dev/sdc1 is apparently in use by the system; will not make a filesystem here!
添加完磁盘,并且分区后,执行格式化命令,报错:/dev/sdc1 is apparently in use by the system; will not make a filesystem here!/dec/sdc1正在被DM管理,所以我们创建文件系统时提示报错,我们手工的移除,就可以正常的创建文件系统,操作如下:[root@rac1 ~]# cat /proc/partiti原创 2016-06-22 17:11:35 · 3659 阅读 · 1 评论 -
linux执行脚本报错: No such file or directory
执行一个linux 的脚本的时候报错:# ./py_innodb_page_info.py /mysql/data/gw/t.ibd: No such file or directorytrace跟踪一下:execve("./py_innodb_page_info.py", ["./py_innodb_page_info.py", "/mysql/data/gw/t.ibd"]原创 2016-07-18 16:22:10 · 4903 阅读 · 0 评论 -
device eth0 does not seem to be present, delaying initialization
我的是workstation中复制的虚拟机,复制后,网卡显示是eth1,我想改成eth0,直接修改/etc/sysconfig/network-scripts/ifcfg-eth0里面的mac地址为eth1的[root@mysql1 rules.d]# ifconfig -aeth1 Link encap:Ethernet HWaddr 00:0C:29:87:27:79原创 2016-06-21 09:37:50 · 465 阅读 · 0 评论 -
/bin/bash^M: bad interpreter: No such file or directory
执行一个shell脚本的时候报错:$ /home/oracle/task/db.sh -bash: /home/oracle/task/db.sh: /bin/bash^M: bad interpreter: No such file or directory好像在末尾多了个^M的符号。好像是windows格式的,就是dos格式的看看文件编码:vi这个文件,输入:s原创 2016-07-12 14:01:44 · 373 阅读 · 0 评论 -
The X11 forwarding request was rejected!
用xmanager连接linux的时候报错:The X11 forwarding request was rejected!to solve this problem,please turn on the X11 forwarding feather of the remote SSH server其原因是肯能对openssh版本进行了升级。解决方法为:1. vi原创 2016-06-14 14:51:25 · 2750 阅读 · 0 评论