Giter VIP home page Giter VIP logo

issues's People

Watchers

 avatar  avatar

issues's Issues

java开发当中的问题

1.Autowired members must be defined in the valid spring bean(@Component/@service,etc.) less... (Ctrl+F1) Checks autowiring problems in a bean class
suppress all inspections for class

2.java: 无法找到类型 'java.lang.annotation.Repeatable' 的注释方法 'value()': 找不到java.lang.annotation.Repeatable的类文件

3.java.lang.IllegalStateException: Failed to load ApplicationContext

#1290 - The MySQL server is running with the --event-scheduler=DISABLED or --skip-grant-tables option so it cannot execute this statement

开启EVENT

我在创建事件时碰到了这个问题

show variables like '%sche%';
set global event_scheduler = 1;

创建事件

create event clear_num 
    on schedule 
        every 1 day starts '2016-06-02 00:00:00'
    on completion preserve disable
    do update vote.contribute set today_num = 0;

开启事件

alter event clear_num on completion preserve enable;

Google了一下skip-grant-tables是表示在启动mysql时不启动grant-tables,授权表。有什么用呢?当然是忘记管理员密码后有用。如果在my.cnf中的有添加"skip-grant-tables",那么任何的帐号用任何的密码(当然也包括空)都可以登录到mysql数据库了。
处理方法:

UPDATE user SET Grant_priv =' Y', Super_priv = 'Y', Event_priv='Y', Trigger_priv='Y' WHERE user = 'root'

然后

restart mysql without the --skip-grant-tables

处理公司业务中出现的curl问题

curl_setopt($curl, CURLOPT_HTTPHEADER, array('Expect:'));

417 - Expectation Failed

解决方法:https://obviate.io/2009/08/17/php-curl-expectation-failed/

curl -v
Connection #0 to host left intact
说明:
These messages are just informationals and don't signify anything particular
for your case I'd say. The first line means that the connection was kept alive
after the transfer and the second that it closed it (since there was no
subsequent transfer using it).

php curl error: malformed
解决方法:urldecode($url)

Can't find messagefile '/usr/share/mysql/errmsg.sys'

mysql无故连接失败,出现错误:Message: SQLSTATE[HY000] [2002] No such file or directory ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock在尝试重启时报错 Can't find messagefile '/usr/share/mysql/errmsg.sys'

vagrant destory
vagrant up
重起一个

linux进入单人维护模式修复循环登录问题

今天在centos在命令行模式下循环登录,输入账号密码又回到输入账号的界面,如果输入错误的密码则提示错误

先将系统重新开机,在读秒的时候按下任意键就会出现操作系统的选择画面,仔细看选单底下的说明, 按下『e』就能进入grub的编辑模式了。此時你看到的画面有点像底下这样:

root (hd0,0)
kernel /vmlinuz-2.6.18-128.el5 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.18-128.el5.img

此时,请将游标移动到kernel那一行,再按一次『 e 』进入kernel该行的编辑画面中, 然后在出现的画面
当中,最后方输入 “single” :

kernel /vmlinuz-2.6.18-128.el5 ro root=LABEL=/ rhgb quiet single

再按下『 Enter 』確定之後,按下 b 就可以开机進入单人维护模式了!


尝试对出现问题的文件的修改恢复,此时出现以下问题


bash_profile
Solution:
1、echo $HOME,无显示,说明的确是因为HOME未设置造成的。
2、vim ~/.bash_profile 修改登录脚本,添加HOME变量
3、添加如下内容

  HOME=/root
export HOME
:wq 

然后使用命令:

#source ~/.bash_profile

重启后还是有bug:echo $HOME没有输出,需要再次

source ~/.bash_profile

(why???)

补充:
用户登陆Linux操作系统的时候,"/etc/profile", "/.bash_profile"等置文件会被自动执行。

执行过程是这样的

登陆Linux系统时,首先启动"/etc/profile",

然后启动用户目录下的"
/.bash_profile",

如果"/.bash_login"和"/.profile"文件存在的时候也会在执行。

下面看看"~/.bash_profile"文件里面有什么东西

$cat ~/.bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin:/home/work/local/python/lib/python2.6/site-packages/django/bin/:$HOME/bin:/home/work/local/mysql5/bin/;
LD_LIBRARY_PATH=/home/work/local/mysql5/lib/mysql
alias py='/home/work/local/python/bin/python'
export PATH LD_LIBRARY_PATH
unset USERNAME

可以看到~/.bash_profile文件先调用~/.bashrc,然后再把PATH和LD_LIBRARY_PATH加载。

环境变量相关配置文件

/etc/profile:此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行,并从/etc/profile.d目录的设置文件中搜集shell的设置。
/etc/bashrc:为每一个运行bash shell的用户执行此文件,当bash shell被打开时,该文件被读取.
~/.bash_profile:每个用户都可使用该文件输入专用于自己使用的shell信息,当用户登录时,该文件仅仅执行一次。默认情况下,他设置一些环境变量,执行用户的.bashrc文件。

~/.bashrc:该文件包含专用于你的bash shell的bash信息,当登录时及每次打开新的shell时,该该文件被读。

~/.bash_logout:当每次退出系统(退出bash shell)时,执行该文件。
/etc/profile是全局性的功能,其中设置的变量作用于所有用户,~/.bash_profile中设置的变量能继承/etc/profile中的变量并作用于用户。
~/.bash_profile 是交互式、login 方式进入 bash 运行的
~/.bashrc 是交互式 non-login 方式进入 bash 运行的

通常二者设置大致相同,所以通常前者会调用后者。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.