zoukankan      html  css  js  c++  java
  • MySQL客户端mysqladmin命令

    1)设置密码

    #1.设置密码
    [root@db02 ~]# mysqladmin -uroot password
    New password: 
    Confirm new password:
    
    #2.修改密码
    [root@db02 ~]# mysqladmin -uroot -p password
    Enter password: 
    New password: 
    Confirm new password:

    2)关闭服务

    [root@db02 ~]# mysqladmin -uroot -p shutdown 
    Enter password: 123

    3)库外建库

    [root@db02 ~]# mysqladmin -uroot -p123 create database222222

    4)库外删库

    [root@db02 ~]# mysqladmin -uroot -p123 drop database222222
    Warning: Using a password on the command line interface can be insecure.
    Dropping the database is potentially a very bad thing to do.
    Any data stored in the database will be destroyed.
    
    Do you really want to drop the 'database222222' database [y/N] y
    Database "database222222" dropped

    5)查看数据库配置

    [root@db02 ~]# mysqladmin -uroot -p123 variables | grep -w server_id

    6)检测数据库是否启动

    [root@db02 ~]# mysqladmin -uroot -p ping
    Enter password: 
    mysqld is alive

    7)查看数据库信息

    [root@db02 ~]# mysqladmin -uroot -p123 status
    Warning: Using a password on the command line interface can be insecure.
    Uptime: 130  Threads: 1  Questions: 94  Slow queries: 0  Opens: 70  Flush tables: 1  Open tables: 63  Queries per second avg: 0.723
    
    Slow queries: 0
    Queries per second avg: 0.723

    8)刷新授权表

    [root@db02 ~]# mysqladmin -uroot -p123 reload
  • 相关阅读:
    jQuery检测滚动条(scroll)是否到达底部
    sql group by
    hbm.xml 详解总结
    net.sf.json 时间格式的转化
    经典SQL语句大全
    HashTable
    in与exist , not in与not exist 的区别
    网页布局常用的一些命名规则和书写
    什么是SOA?
    sql之left join、right join、inner join的区别
  • 原文地址:https://www.cnblogs.com/chenlifan/p/13874966.html
Copyright © 2011-2022 走看看