zoukankan      html  css  js  c++  java
  • 十.mysqld_multi stop无效问题

    今天在尝试运行mysqld_report stop的时候,发现无法停止mysql,日志中的错误如下

    Stopping MySQL servers
    
    mysqladmin: [Warning] Using a password on the command line interface can be insecure.
    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: YES)'
    mysqladmin: [Warning] Using a password on the command line interface can be insecure.
    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: YES)'
    mysqladmin: [Warning] Using a password on the command line interface can be insecure.
    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: YES)'
    mysqld_multi log file version 2.16; run: Tue Jan 17 14:19:01 2017

    可以看出,肯定是使用mysqladmin无法登录的问题。

    但是,我的my.cnf配置文件中,已经指定了user和password,整个文件内容如下

    [client]
    port=3306
    socket=/tmp/mysql.sock
     
    
    [mysqld_multi]
    user=root
    password=root
    mysqld=/usr/local/mysql/bin/mysqld_safe
    mysqladmin=/usr/local/mysql/bin/mysqladmin
    log=/home/mysql/mysqld_multi.log
    
    
    [mysqld]
    basedir=/usr/local/mysql
    sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
    
    
    [mysqld3306]  
    mysqld=mysqld  
    mysqladmin=mysqladmin  
    datadir=/home/mysql/mysql3306/data  
    port=3306  
    server_id=3306  
    socket=/tmp/mysql3306.sock  
    log-output=file  
    slow_query_log = 1  
    long_query_time = 1  
    slow_query_log_file = /home/mysql/mysql3306/log/slow.log  
    log-error = /home/mysql/mysql3306/log/error.log  
    binlog_format = mixed  
    log-bin = /home/mysql/mysql3306/log/mysql3306_bin
    
    
    
    [mysqld3307]
    mysqld=mysqld
    mysqladmin=mysqladmin
    datadir=/home/mysql/mysql3307/data
    port=3307
    server_id=3307
    socket=/tmp/mysql3307.sock
    log-output=file
    slow_query_log = 1
    long_query_time = 1
    slow_query_log_file = /home/mysql/mysql3307/log/slow.log
    log-error = /home/mysql/mysql3307/log/error.log
    binlog_format = mixed
    log-bin = /home/mysql/mysql3307/log/mysql3307_bin
    
    
    
    
    [mysqld3308]
    mysqld=mysqld
    mysqladmin=mysqladmin
    datadir=/home/mysql/mysql3308/data
    port=3308
    server_id=3308
    socket=/tmp/mysql3308.sock
    log-output=file
    slow_query_log = 1
    long_query_time = 1
    slow_query_log_file = /home/mysql/mysql3308/log/slow.log
    log-error = /home/mysql/mysql3308/log/error.log
    binlog_format = mixed
    log-bin = /home/mysql/mysql3308/log/mysql3308_bin

    其实,此时的配置有问题不对“password=root”应该改为“pass=root”,文件如下

    [client]
    port=3306
    socket=/tmp/mysql.sock
     
    
    [mysqld_multi]
    user=root
    pass=root
    mysqld=/usr/local/mysql/bin/mysqld_safe
    mysqladmin=/usr/local/mysql/bin/mysqladmin
    log=/home/mysql/mysqld_multi.log
    
    
    [mysqld]
    basedir=/usr/local/mysql
    sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
    
    
    [mysqld3306]  
    mysqld=mysqld  
    mysqladmin=mysqladmin  
    datadir=/home/mysql/mysql3306/data  
    port=3306  
    server_id=3306  
    socket=/tmp/mysql3306.sock  
    log-output=file  
    slow_query_log = 1  
    long_query_time = 1  
    slow_query_log_file = /home/mysql/mysql3306/log/slow.log  
    log-error = /home/mysql/mysql3306/log/error.log  
    binlog_format = mixed  
    log-bin = /home/mysql/mysql3306/log/mysql3306_bin
    
    
    
    [mysqld3307]
    mysqld=mysqld
    mysqladmin=mysqladmin
    datadir=/home/mysql/mysql3307/data
    port=3307
    server_id=3307
    socket=/tmp/mysql3307.sock
    log-output=file
    slow_query_log = 1
    long_query_time = 1
    slow_query_log_file = /home/mysql/mysql3307/log/slow.log
    log-error = /home/mysql/mysql3307/log/error.log
    binlog_format = mixed
    log-bin = /home/mysql/mysql3307/log/mysql3307_bin
    
    
    
    
    [mysqld3308]
    mysqld=mysqld
    mysqladmin=mysqladmin
    datadir=/home/mysql/mysql3308/data
    port=3308
    server_id=3308
    socket=/tmp/mysql3308.sock
    log-output=file
    slow_query_log = 1
    long_query_time = 1
    slow_query_log_file = /home/mysql/mysql3308/log/slow.log
    log-error = /home/mysql/mysql3308/log/error.log
    binlog_format = mixed
    log-bin = /home/mysql/mysql3308/log/mysql3308_bin
  • 相关阅读:
    LIBSVM使用介绍
    Symbian开发平台的搭建之VC++6.0&&Carbide C++ 2.0
    traits:Traits技术初探
    SDK与IDE的选择(附上设置默认SDK)
    浅析COM的思想及原理
    Windows Live Writer 支持的博客
    JQuery笔记(四) 通用选择的尝试
    JQuery笔记(一)
    JQuery笔记(二) animate支持的属性
    在DW绿化版或者精简版中使用扩展管理
  • 原文地址:https://www.cnblogs.com/qizhelongdeyang/p/6292966.html
Copyright © 2011-2022 走看看