Coder Social home page Coder Social logo

gwork's People

Contributors

gary5z avatar

Watchers

 avatar

Forkers

luoyong1993

gwork's Issues

【MySQL】启动提示Warning: World-writable config file '/etc/my.cnf' is ignored

问题:

[root@iz2ze148jq0xn06jls2jw3z etc]# service mysqld start
Warning: World-writable config file '/etc/my.cnf' is ignored
Starting MySQL. [ OK ]

原因:

为了方便操作,就将“/etc/mysql/my.cnf” 的权限设置成 “777” 了,然后进行修改,当修改完进行重启mysql的时候,却报错,提示Warning: World-writable config file '/etc/mysql/my.cnf' is ignored ,大概意思是权限全局可写,任何一个用户都可以写。mysql担心这种文件被其他用户恶意修改,所以忽略掉这个配置文件。

解决:
权限修改为仅当前用户可读写,即644

[root@iz2ze148jq0xn06jls2jw3z etc]# chmod 644 /etc/my.cnf

【MySQL】启动报错The server quit without updating PID file

问题:

[root@iz2ze148jq0xn06jls2jw3z ~]# service mysqld start
Starting MySQL...The server quit without updating PID file [FAILED]sql-5.6.15/data/iz2ze148jq0xn06jls2jw3z.pid).

解决:
分析日志文件:mysql/data/iz2ze148jq0xn06jls2jw3z.err

[root@iz2ze148jq0xn06jls2jw3z data]# vim iz2ze148jq0xn06jls2jw3z.err
2018-09-10 11:19:33 7590 [ERROR] /opt/mysql-5.6.15/bin/mysqld: unknown variable 'lower_case_file_system=ON'

可知,原因是MySQL不支持设置参数lower_case_file_system=ON

【MySQL】设置Linux下Mysql表名不区分大小写

1、Linux下mysql安装完后是默认:区分表名的大小写,不区分列名的大小写;
2、用root帐号登录后,在/etc/my.cnf中的[mysqld]后添加添加lower_case_table_names=1,重启MYSQL服务,这时已设置成功:不区分表名的大小写;
lower_case_table_names参数详解:
lower_case_table_names=0
其中0:区分大小写,1:不区分大小写

MySQL在Linux下数据库名、表名、列名、别名大小写规则是这样的:
1、数据库名与表名是严格区分大小写的;
2、表的别名是严格区分大小写的;
3、列名与列的别名在所有的情况下均是忽略大小写的;
4、变量名也是严格区分大小写的;
MySQL在Windows下都不区分大小写。

【MySQL】my_print_defaults: command not found

运行提示

#  /etc/init.d/mysqld restart
/etc/rc.d/init.d/mysqld: line 206: my_print_defaults: command not found
/etc/rc.d/init.d/mysqld: line 209: my_print_defaults: command not found
/etc/rc.d/init.d/mysqld: line 234: cd: /usr/local/mysql: No such file or directory
Starting MySQLCouldn't find MySQL manager or server[FAILED]

解决办法:

编辑/etc/my.cnf 文件,因为缺少basedir 和 datadir 两个路径,在 [mysqld] 添加上即可
#vim /etc/my.cnf
[mysqld]
...........
...........
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data

保存退出,然后重新启动就可以

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.