mysql实在ubuntu 12.04下通过sudo apt-get install mysql-server mysql-client安装的,安装时要求为root制定密码,已经指定-----
安装完成后,以当前用户身份在Terminal中敲mysql 竟然直接登入了数据库,敲mysql -u root -p 要求输入密码也登录成功,这是神马问题,非root用户直接敲mysql都能进,难道没密码?????????
=======================================================================================================================
~$ mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 46
Server version: 5.5.24-0ubuntu0.12.04.1 (Ubuntu)
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
mysql登录账号
- qy117121
- 论坛版主
- 帖子: 50550
- 注册时间: 2007-12-14 13:40
- 系统: Winbuntu
- 来自: 志虚国乌由市
- 联系:
Re: mysql登录账号
$mysql
ERROR 1045 (28000): Access denied for user 'lengxx'@'localhost' (using password: NO)
渠月 · QY
本人只会灌水,不负责回答问题
无聊可以点一下→ http://u.nu/ubuntu
Ubuntu 20.04 快速设置指南,请配合浏浏览器自动翻译使用
邮箱 chuan@ubuntu.org.cn
本人只会灌水,不负责回答问题
无聊可以点一下→ http://u.nu/ubuntu
Ubuntu 20.04 快速设置指南,请配合浏浏览器自动翻译使用
邮箱 chuan@ubuntu.org.cn
-
- 帖子: 43
- 注册时间: 2008-05-31 13:43
Re: mysql登录账号
在本地运行的mysql当然能够本地登录啦,不过能不能用数据库就另一个问题了
-
- 帖子: 186
- 注册时间: 2007-11-26 12:05
Re: mysql登录账号
为什么你不先 hack 一下 MySQL 官方文档呢?
文档里面已经明确指出:
文档里面已经明确指出:
http://dev.mysql.com/doc/refman/5.5/en/ ... cting.htmlSome MySQL installations permit users to connect as the anonymous (unnamed) user to the server running on the local host.
If this is the case on your machine, you should be able to connect to that server by invoking mysql without any options:
-
- 帖子: 186
- 注册时间: 2007-11-26 12:05
Re: mysql登录账号
you should be able to connect to that server by invoking mysql without any options
-
- 帖子: 2
- 注册时间: 2013-01-04 23:32
- 系统: 2PF2
Re: mysql登录账号
楼上的正解,你需要删除匿名用户,[url=http://www.zhetenger.com/mysql%E5%9F%BA ... E%E7%BD%AE]mysql基本安全设置/url]