mysqladmin

MySQL性能调优与架构设计--mysql自带工具使用

落爺英雄遲暮 提交于 2019-12-05 12:23:37
1、mysql: 个人的提示符定义: "\\u@\\h : \\d \\r:\\m:\\s> ",显示效果: “sky @localhost : test 04:25:45>” 2、mysqladmin Usage: mysqladmin [OPTIONS] command command ... mysqadmin,顾名思义,提供的功能都是与MySQL 管理相关的各种功能。如MySQL Server 状态检查,各种统计信息的flush,创建/删除数据库,关闭MySQL Server 等等。mysqladmin 所能做的事情,虽然大部分都可以通过mysql 连接登录上MySQL Server 之后来完成,但是 大部分通过mysqladmin 来完成操作会更简单更方便。这里我将介绍一下自己经常使用到的 几个常用功能: ping 命令可以很容易检测MySQL Server 是否还能正常提供服务 sky @sky :~# mysqladmin -u sky -ppwd -h localhost ping mysqld is alive status 命令可以获取当前MySQL Server 的几个基本的状态值: sky @sky :~# mysqladmin -u sky -ppwd -h localhost status Uptime: 20960 Threads: 1

SQL: Interrupting a query

你说的曾经没有我的故事 提交于 2019-12-04 04:07:37
I've worked on a project using a proprietary non-SQL DB where queries could be interrupted and in the codebase there were quite some spots where that functionnality was used and made perfect sense (for example to stop a long running query that gets cancelled by the user, or when a more recent query takes place and renders the previous query obsolete, etc.) and I realized I never really saw that kind of "interrupted queries" previously and thought it could make a good SO question (several questions, but they're all related to exactly the same thing): can SQL queries be interrupted? is this part

mysqladmin: connect to server at 'localhost' failed

余生颓废 提交于 2019-12-04 03:09:43
Today (2015-05-02) I upgraded my Linux system via apt-get update and apt-get upgrade whereas mysql, mysqladmin and a lot more packages have been updated. The mysql-server-5.5 runs and I can login and do all the typical database operations but when I type: user@ubuntu:~# mysqladmin proc I get the following error: mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: NO)' Formerly I could solve this issue by simple setting the mysql root password new. This does not solve the issue anymore: user@ubuntu:~# sudo dpkg-reconfigure mysql

Mysql客户端管理工具mysqladmin用法

有些话、适合烂在心里 提交于 2019-12-01 11:30:33
Mysqladmin 适合于linux和windows系统 linux下: mysqladmin -u[username] -p[password] status windows下: 先在安装目录找到mysqladmin.exe,然后在dos界面下change到这个目录,执行 mysqladmin -u[username] -p[password] extended-status 这里的extended-status和status只是mysqladmin的两个参数而已! MySQLAdmin用法 MySQLAdmin用于执行管理性操作。语法是: shell> mysqladmin [OPTIONS] command [command-option] command ... 通过执行mysqladmin --help,你可以得到你mysqladmin的版本所支持的一个选项列表。 目前mysqladmin支持下列命令: create databasename 创建一个新数据库 drop databasename 删除一个数据库及其所有表 extended-status 给出服务器的一个扩展状态消息 flush-hosts 洗掉所有缓存的主机 flush-logs 洗掉所有日志 flush-tables 洗掉所有表 flush-privileges 再次装载授权表(同reload)

MySQL root password change

こ雲淡風輕ζ 提交于 2019-11-28 18:07:21
I have been trying to reset my MySQL root password. I have run the mysqld_safe --skip-grant-tables, updated the root password, and checked the user table to make sure it is there. Once restarting the mysql daemon I tried logging in with the new root password that I just set and still get Access denied for user 'root' errors. I have also tried completely removing and reinstalling mysql (including removing the my.cnf file) and still no luck. Does anyone have any suggestions on what I can do next? Thanks in advance kta SET PASSWORD FOR 'root'@'localhost' = PASSWORD('mypass'); hava a look at this

Difference between mysql, mysqladmin, mysqld [closed]

社会主义新天地 提交于 2019-11-28 16:30:13
Can someone give me a clear explanation of the differences between mysql (command line tool), mysqladmin (client tool for performing administrative tasks) and mysqld (mysql server). You could easily find that out yourself by just reading the man pages about the three commands: mysqld is the server executable (one of them) mysql is the command line client mysqladmin is a maintainance or administrative utility They serve different purposes. There is not simply a "difference" between them. For different task you have different utilities. Just like you use a screwdriver for a screw and a hammer

ERROR 1044 (42000): Access denied for 'root' With All Privileges

心不动则不痛 提交于 2019-11-27 07:51:16
I have strange error. I am logged in local Mysql as root via command line. After creating database: create database some_db; Then giving privileges to some user: grant all privileges on some_db.* to some_user@'localhost' identified by 'password'; This is giving error: ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'some_db' The permissions for the root(show grants;) shows: GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*8919C53DC7A4DFBF3F8584382E96463583EB7FDA' I am also making sure i am logged in as root: select current_user(); And this

Why MySQL connection is blocked of many connection errors?

喜你入骨 提交于 2019-11-27 03:11:18
问题 As you can see I have a problem on a database connection. It gives me this error: ...is blocked because of many connection errors I searched some answers but I couldn't solve my problem. I don't know if I gave all the information that you need, so if you need something else, just tell me. I have a database connection from different computers and I had a user created to access the database but it had % in the hosts row, so I wanted to change it with an IP address for security issues and it