免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
123下一页
最近访问板块 发新帖
查看: 5095 | 回复: 23
打印 上一主题 下一主题

这个版面人气较旺,就在这问吧,一个厄待解决的问题……mysql [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-05-22 13:24 |只看该作者 |倒序浏览
我装了redhat8.0,数据库我是按默认安装的。安装完毕以后我想进入数据库进行操作,但是我在shell里面输入mysqladmin时,却出现下列字符和代码,不明白什么意思,求帮忙:)

[root@linuxtest root]# mysqladmin
mysqladmin  Ver 8.23 Distrib 3.23.52, for pc-linux-gnu on i686
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Administration program for the mysqld daemon.
Usage: mysqladmin [OPTIONS] command command....

  -#, --debug=...       Output debug log. Often this is 'd:t,filename`
  -f, --force           Don't ask for confirmation on drop database; with
                        multiple commands, continue even if an error occurs
  -?, --help            Display this help and exit
  --character-sets-dir=...
                        Set the character set directory
  -C, --compress        Use compression in server/client protocol
  -h, --host=#          Connect to host
  -p, --password[=...]  Password to use when connecting to server
                        If password is not given it's asked from the tty
  -P  --port=...        Port number to use for connection
  -i, --sleep=sec       Execute commands again and again with a sleep between
  -r, --relative        Show difference between current and previous values
                        when used with -i. Currently works only with
                        extended-status
  -E, --vertical        Print output vertically. Is similar to --relative,
                        but prints output vertically.
  -s, --silent          Silently exit if one can't connect to server
  -S, --socket=...      Socket file to use for connection
  -u, --user=#          User for login if not current user
  -v, --verbose         Write more information
  -V, --version         Output version information and exit
  -w, --wait[=retries]  Wait and retry if connection is down

Default options are read from the following files in the given order:
/etc/my.cnf /var/lib/mysql/my.cnf ~/.my.cnf
The following groups are read: mysqladmin client
The following options may be given as the first argument:
--print-defaults        Print the program argument list and exit
--no-defaults           Don't read default options from any options file
--defaults-file=#       Only read default options from the given file #
--defaults-extra-file=# Read this file after the global files are read

Possible variables for option --set-variable (-O) are:
connect_timeout       current value: 0
shutdown_timeout      current value: 3600

Where command is a one or more of: (Commands may be shortened)
  create databasename   Create a new database
  drop databasename     Delete a database and all its tables
  extended-status       Gives an extended status message from the server
  flush-hosts           Flush all cached hosts
  flush-logs            Flush all logs
  flush-status          Clear status variables
  flush-tables          Flush all tables
  flush-threads         Flush the thread cache
  flush-privileges      Reload grant tables (same as reload)
  kill id,id,...        Kill mysql threads
  password new-password Change old password to new-password
  ping                  Check if mysqld is alive
  processlist           Show list of active threads in server
  reload                Reload grant tables
  refresh               Flush all tables and close and open logfiles
  shutdown              Take server down
  status                Gives a short status message from the server
  start-slave           Start slave
  stop-slave            Stop slave
  variables             Prints variables available
  version               Get version info from server
[root@linuxtest root]#

恳求帮忙,谢之

论坛徽章:
0
2 [报告]
发表于 2003-05-22 13:27 |只看该作者

这个版面人气较旺,就在这问吧,一个厄待解决的问题……mysql

mysqladmin是一个管理程序,需要参数:-u user ,默认是root,没有密码连接mysql可以直接使用mysql

论坛徽章:
0
3 [报告]
发表于 2003-05-22 13:36 |只看该作者

这个版面人气较旺,就在这问吧,一个厄待解决的问题……mysql

我用下面语句去改密码,结果出现错误的提示,不明白什么意思
[root@linuxtest root]# mysqladmin -uroot -password ab12
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: YES)'
[root@linuxtest root]#

论坛徽章:
0
4 [报告]
发表于 2003-05-22 13:40 |只看该作者

这个版面人气较旺,就在这问吧,一个厄待解决的问题……mysql

你先直接用mysql检查以下是否有密码,如果没有,直接在里边改,如果有秘密,先用mysqladmin -u root -ppassword连接数据库,然后改之

论坛徽章:
0
5 [报告]
发表于 2003-05-22 14:06 |只看该作者

这个版面人气较旺,就在这问吧,一个厄待解决的问题……mysql

这样连不上,当我输入mysqladmin -u root -ppassword时,出现的提示和我顶楼发的问题一样,是不是我没有装mysql-client

论坛徽章:
0
6 [报告]
发表于 2003-05-22 14:08 |只看该作者

这个版面人气较旺,就在这问吧,一个厄待解决的问题……mysql

直接用mysql能否连上

论坛徽章:
0
7 [报告]
发表于 2003-05-22 14:20 |只看该作者

这个版面人气较旺,就在这问吧,一个厄待解决的问题……mysql

可以

直接输入mysql出现下列情况
[root@linuxtest mysql]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 11 to server version: 3.23.52

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>;

论坛徽章:
0
8 [报告]
发表于 2003-05-22 14:29 |只看该作者

这个版面人气较旺,就在这问吧,一个厄待解决的问题……mysql

那就对了,默认用户是root没有密码;

现在你就可以使用mysql数据库了

论坛徽章:
0
9 [报告]
发表于 2003-05-22 14:40 |只看该作者

这个版面人气较旺,就在这问吧,一个厄待解决的问题……mysql

赶问大哥我怎样改密码啊

论坛徽章:
0
10 [报告]
发表于 2003-05-22 14:44 |只看该作者

这个版面人气较旺,就在这问吧,一个厄待解决的问题……mysql

set password for root =password("newpassword";
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP