测试mysqld启动mysql server的时候,报如下错误:

2015-12-17 00:46:02 10785 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

2015-12-17 00:46:02 10785 [ERROR] Aborting

2015-12-17 00:46:02 10785 [Note] Binlog end
2015-12-17 00:46:02 10785 [Note] ./mysqld: Shutdown complete

原因:

这是因为在测试的时候,使用root来启动的。而从安全角度来讲,不建议用root用户启动。

解决方案:

1.在使用root用户启动的时候,带上--user=root,强制启动(不建议这么做,仅供测试)

# ./mysqld --user=root &
# ps -ef|grep mysql | grep -v grep
root 11055 11019 0 01:02 pts/0 00:00:00 ./mysqld --user=root

2.启动的时候,指定mysql用户

# ./mysqld --user=mysql &
# ps -ef|grep mysql |grep -v grep
mysql 11165 11100 2 01:06 pts/1 00:00:00 ./mysqld --user=mysql

3.在my.cnf指定用户

[mysqld]
user=mysql

[ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!的更多相关文章

  1. Please read “Security” section of the manual to find out how to run mysqld as root!错误解决(转)

    2016-03-12T15:40:45.717762Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please ...

  2. mysql多实例配置下,用脚本启动mysql时,出现Please read "Security" section of the manual to find out how to run mysqld as root!

    [root@localhost 3308]# mysqld stop170414 0:35:28 [Note] --secure-file-priv is set to NULL. Operation ...

  3. Please read "Security" section of the manual to find out how to run mysqld as root!

    [root@test ~]# /usr/local/mysql/bin/mysqld2018-08-05T08:29:05.143142Z 0 [Warning] [MY-011070] [Serve ...

  4. mysql [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist (转载)

    mysql报错Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 2013-11-2 ...

  5. [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

    mysql 启动总是报错: 错误日志中显示: [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' ...

  6. [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist 160913 02:11:21 mysqld_safe mysqld from pid file /tmp/mysql.pid ended

    -- :: [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0 -- :: [Warning] InnoDB: New ...

  7. ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)

    1.之前搭建的kafka,过了好久,去启动kafka,发现报如下下面的错误,有错误就要解决了. 然后参考:https://blog.csdn.net/hello_world_qwp/article/d ...

  8. [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist

    这个问题是由于data的目录下没有安装数据库表 解决方法: vi /etc/my.cnf 修改为正确的datadir=“xxxxx”即可 然后service mysqld start service ...

  9. Swift Error fatal error: unexpectedly found nil while unwrapping an Optional value

    致命的错误: 对一个为空的optional值进行解包. 强制解包(forced unwrapping): 在optional后面加叹号. 比如  "value!" 错误代码: le ...

随机推荐

  1. 关于MySQL checkpoint

    Ⅰ.Checkpoint 1.1 checkpoint的作用 缩短数据库的恢复时间 缓冲池不够用时,将脏页刷到磁盘 重做日志不可用时,刷新脏页 1.2 展开分析 page被缓存在bp中,page在bp ...

  2. if条件简单语法

    if语句是实际工作中最重要最常用的语句. if条件语法: 单分支结构 if [ 条件 ] then 指令 fi 或 if [ 条件 ]:then 指令 fi if 单分支条件中文编程形象语法: 如果 ...

  3. SVN与Git比较的优缺点差异

    目录: SVN与Git比较(一)集中式vs分布式 SVN与Git比较(二)版本库与工作区 SVN与Git比较(三)全局版本号和全球版本号 SVN与Git比较(四)部分检出 SVN与Git比较(五)更新 ...

  4. Java jni字符串转换

    1.jstring转QString 对于Qt5.2以上(含)可以用QAndroidJniObject::toString(),详见这里:https://stackoverflow.com/questi ...

  5. 使用navicat 连接mysql出现1251错误

    最近需要用MYSQL,使用navicat 连接时总出现1251错误,在网上查了一些别人的方法并试过 以下方法是正确的. 方法来自:https://blog.csdn.net/XDMFC/article ...

  6. C++中如何按照map中的value来进行排序

    sort函数无法对map进行排序,网上的方法一般是通过将map转为vector后,再来使用sort进行排序. 如下, 比较函数 bool cmp(const pair<int,int> & ...

  7. salt-api安装与配置

    一,安装部分[root@LCB-U-syng01 ~]#wget https://pypi.python.org/packages/source/p/pip/pip-1.5.6.tar.gz#md5= ...

  8. 2018-2019-2 《网络对抗技术》Exp0 Kali安装 Week1 20165318

    2018-2019-2 <网络对抗技术>Exp0 Kali安装 Week1 20165318 下载地址 Kali官网,选择Kali Linux 64 bit VMware 安装步骤 以下步 ...

  9. Semaphore实现的生产者消费者程序

    Semaphore:Semaphores are often used to restrict the number of threads than can access some (physical ...

  10. 一个非常好的php实现手机号归属地查询接口类

    前一阵子看到了一个非常好的php手机归属地查询的类,写的很精简,查询也很精确!大致代码是这样的: <?php header("Content-type:text/html;charse ...