windowsxp系统 mysql-5.0.11-beta-win32
提示:1045 access denied for user 'root'@'localhost' using password yes
前几天都好好的,昨天没弄,结果今天晚上过来提示上面的这个错误,重启mysql还是不可以
网上的方法看了几个但是不知道怎么弄
方法一:
# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD(’newpassword’) where USER=’root’;
mysql> FLUSH PRIVILEGES;
mysql> quit
# /etc/init.d/mysql restart
# mysql -uroot -p
Enter password: <输入新设的密码newpassword>
mysql>
方法二:
直接使用/etc/mysql/debian.cnf文件中[client]节提供的用户名和密码:
# mysql -udebian-sys-maint -p
Enter password: <输入[client]节的密码>
mysql> UPDATE user SET Password=PASSWORD(’newpassword’) where USER=’root’;
mysql> FLUSH PRIVILEGES;
mysql> quit
# mysql -uroot -p
Enter password: <输入新设的密码newpassword>
mysql> 内容来自: 脚本之家 www.jb51.net 另一个方法
Windows:1. 管理员登陆系统,停止mysql服务或者结束mysqld-nt进程
2. 进入命令行,来到mysql的安装目录.假设安装目录为 d:\mysql\ , CMD进入命令行
3. 运行 d:\mysql\bin\mysqld-nt --skip-grant-tables 启动mysql,关闭权限的检查
4. 运行 d:\mysql\bin\mysqladmin -u root flush-privileges password "newpassword" 重设root密码
5. 重新启动mysql服务第4步也可以直接修改mysql表,所用到的SQL语句同linux部分,这里就不再重复了.请不要乱给答案否则不给分
一定要试验过的成功经验,谢谢!
提示:1045 access denied for user 'root'@'localhost' using password yes
前几天都好好的,昨天没弄,结果今天晚上过来提示上面的这个错误,重启mysql还是不可以
网上的方法看了几个但是不知道怎么弄
方法一:
# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD(’newpassword’) where USER=’root’;
mysql> FLUSH PRIVILEGES;
mysql> quit
# /etc/init.d/mysql restart
# mysql -uroot -p
Enter password: <输入新设的密码newpassword>
mysql>
方法二:
直接使用/etc/mysql/debian.cnf文件中[client]节提供的用户名和密码:
# mysql -udebian-sys-maint -p
Enter password: <输入[client]节的密码>
mysql> UPDATE user SET Password=PASSWORD(’newpassword’) where USER=’root’;
mysql> FLUSH PRIVILEGES;
mysql> quit
# mysql -uroot -p
Enter password: <输入新设的密码newpassword>
mysql> 内容来自: 脚本之家 www.jb51.net 另一个方法
Windows:1. 管理员登陆系统,停止mysql服务或者结束mysqld-nt进程
2. 进入命令行,来到mysql的安装目录.假设安装目录为 d:\mysql\ , CMD进入命令行
3. 运行 d:\mysql\bin\mysqld-nt --skip-grant-tables 启动mysql,关闭权限的检查
4. 运行 d:\mysql\bin\mysqladmin -u root flush-privileges password "newpassword" 重设root密码
5. 重新启动mysql服务第4步也可以直接修改mysql表,所用到的SQL语句同linux部分,这里就不再重复了.请不要乱给答案否则不给分
一定要试验过的成功经验,谢谢!
解决方案 »
- MySQL正则查询,在线求助!!!
- 停掉mysql服务之后为什么还有这么多mysql
- 【求助】两个表tb_account & tb_user 都是 Innodb类型的,在一个事物中进行数据插入操作,tb_account数据插入成功了,tb_use
- 跪求一个批量更新的SQL语句,100分!
- mysql dump....
- 还是老问题 真不会才求助你们。
- postgresq怎么执行存储过程
- 请教MySQl中更改默认的数据库文件存放位置的问题。
- 怎样判断SQL执行结果是SELECT或CREATE ……
- mysql弱口令
- 这条mysql语句explain看起来已经很优化的了,但是执行起来要十几秒
- mysql给视图的列增加备注,你试过了吗?
或批处理文件。
提示这个!
#表示是在cmd后的命令行下输入的命令吧?你能把那些命令写清楚点吗,仿佛我上面在网上拷的有的空格什么的不太对,有的提示参数不对。着急中,谢谢
然后敲下面的粗体的命令。注意你的my.ini位置。C:\Program Files\MySQL\MySQL Server 5.1\bin>mysqld --defaults-file="C:\Program
Files\MySQL\MySQL Server 5.1\my.ini" --console --skip-grant-tables
090515 22:06:09 [Warning] The syntax '--log' is deprecated and will be removed i
n MySQL 7.0. Please use '--general_log'/'--general_log_file' instead.
090515 22:06:09 [Warning] The syntax '--log_slow_queries' is deprecated and will
be removed in MySQL 7.0. Please use '--slow_query_log'/'--slow_query_log_file'
instead.
090515 22:06:09 [Warning] The syntax '--log' is deprecated and will be removed i
n MySQL 7.0. Please use '--general_log'/'--general_log_file' instead.
090515 22:06:09 [Warning] The syntax '--log_slow_queries' is deprecated and will
be removed in MySQL 7.0. Please use '--slow_query_log'/'--slow_query_log_file'
instead.
090515 22:06:09 [ERROR] The update log is no longer supported by MySQL in versio
n 5.0 and above. It is replaced by the binary log. Now starting MySQL with --log
-bin='' instead.
090515 22:06:09 InnoDB: Started; log sequence number 0 324221
090515 22:06:09 [Note] mysqld: ready for connections.
Version: '5.1.33-community-log' socket: '' port: 3306 MySQL Community Server
(GPL)看到这个结果就说明MySQL已经起来了。
再开一个DOS窗口,同样切到mysql bin目录下,
C:\Program Files\MySQL\MySQL Server 5.1\bin>mysql -uroot mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.33-community-log MySQL Community Server (GPL)Type 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql>到这,你就继续按 方法一:操作就行。update完表后,退出,然后
C:\Program Files\MySQL\MySQL Server 5.1\bin>mysqladmin shutdown之后正常重启MySQL服务就行了。
然后敲下面的粗体的命令。注意你的my.ini位置。上面这段字你看了吗?!
对不起,哪个图怎么贴上来,他老是提示要输入http://。我不知道该怎么弄。可不可以告诉一下,谢谢了
C:\Program Files\MySQL\MySQL Server 5.1\bin>mysqld --defaults-file="C:\Program
Files\MySQL\MySQL Server 5.1\my.ini" --console --skip-grant-tables
090524 6:40:13 InnoDB: Operating system error number 32 in a file operation.
InnoDB: The error means that another program is using InnoDB's files.
InnoDB: This might be a backup or antivirus software or another instance
InnoDB: of MySQL. Please close it to get rid of this error.
090524 6:40:23 InnoDB: Operating system error number 32 in a file operation.
InnoDB: The error means that another program is using InnoDB's files.
InnoDB: This might be a backup or antivirus software or another instance
InnoDB: of MySQL. Please close it to get rid of this error.
请教三楼上边是什么错误。。
楼主的问题我曾上网搜过,别人写的方法我都没有试验成功,我看权威指南写的方法,我试验成功了。
net stop mysql 停用服务
{mysqld]
skip_grant_tables(加上这句话)
你把你的bin目录加入path路径里边 在dos里边输入 mysql -uroot -p 就可进入mysql在修改密码了。。
InnoDB: The error means that another program is using InnoDB's files.这个文件正在被其实程序使用中。检查一下你的mysqld有没有关闭,或者有没有什么程序在锁定这个文件。
好像不需要关闭mysql服务,关闭反而报错,说连接不上。
现在我运行成功了,可能是我一次开了两个客户端,导致不能运行mysqldump
十分感谢,我有时在csdn上边问的问题,很感谢你的回答。。
C:\Program Files\MySQL\MySQL Server 5.0\bin>mysqld --defaults-file="C:\Program F
iles\MySQL\MySQL Server 5.0\my.ini" --console --skip-grant-tables
'mysqld' 不是内部或外部命令,也不是可运行的程序
或批处理文件。C:\Program Files\MySQL\MySQL Server 5.0\bin>
这是我的按照三楼步骤弄的,第一步就出现这个
我的bin文件夹下面有这几个mysqld-debug.exe mysqld-debug.map mysqld-debug.pdb mysqld-debug.pdb mysqld-nt.map mysqld-nt.pdb 跟mysqld有关的,是不是我的bin里少东西呢?
Volume in drive C is xxxxxx
Volume Serial Number is xxxxxxx-xx Directory of C:\Program Files\MySQL\MySQL Server 5.1\bin03/16/2009 01:28p 10,715,776 mysqld-debug.exe
03/16/2009 01:29p 6,562,432 mysqld.exe
03/16/2009 01:29p 2,331,264 mysqldump.exe
3 File(s) 19,609,472 bytes
0 Dir(s) 32,020,001,280 bytes freeC:\Program Files\MySQL\MySQL Server 5.1\bin>[/code]
提示:1045 access denied for user 'root'@'localhost' using password yes如果有这个提示,说明你的mysqld已经在运行了。
不知道该怎么办了,反正重装过几次,每次装完是好的,但是第二天来就提示这个错误了
windows 控制面板,服务。
c:\>mysqld --defaults-file="C:\MySQL\MySQLServer6.0\my.ini" --console --skip-grant-tables
重新开一个cmd
c:\>mysql -uroot -p
enter password: <- 回车
mysql>UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql>FLUSH PRIVILEGES;
mysql>quit
以上的方法我到是没用,就是先停止服务,再重新启动服务就OK!
非常感谢ACMAIN_CHM,
向活跃在CSDN中的所有如ACMAIN_CHM一样,耐心、专业的高手们致敬!
分享最快乐,怎能少的了你们呢?
1045 access denied for user 'root'@'localhost' using password yes
Windows:1. 管理员登陆系统,停止mysql服务或者结束mysqld-nt进程
2. 进入命令行,来到mysql的安装目录.假设安装目录为 d:\mysql\ , CMD进入命令行
3. 运行 d:\mysql\bin\mysqld-nt --skip-grant-tables 启动mysql,关闭权限的检查
4. 运行 d:\mysql\bin\mysqladmin -u root flush-privileges password "newpassword" 重设root密码
5. 重新启动mysql服务
这个方法,我试过,可行。就是在cmd里输入mysqld-nt --skip-grant-tables然后重启mysql服务,然后再打开http://localhost/phpmyadmin就行了
原来我只把主机为localhost的密码修改啦,出现“#1045 - Access denied for user 'root'@'localhost' (using password: NO)”这样的错误,后来我把主机为127.0.0.1也修改为相同的密码后问题解决。最后希望大家到我的站指点下 http://www.szbenben.com/
还有一种可能,就是mysqld被系统(比如防火墙)阻止运行了,虽然出现在进程栏,但是没有真正启动起来。
我用的是win7,解除阻止后就出来了。
试试装个phpmyadmin 使用管理界面登陆删除拒绝的用户 红色部分即可。
C:\Documents and Settings\tony>net stop mysql
MySQL 服务正在停止.
MySQL 服务已成功停止。进入bin目录
C:\Documents and Settings\tony>cd C:\Program Files\MySQL\MySQL Server 5.0\bin
C:\Program Files\MySQL\MySQL Server 5.0\bin>mysqld-nt --skip-grant-tables
重新打开一个命令提示符窗口
进入bin目录
C:\Program Files\MySQL\MySQL Server 5.0\bin>mysql
mysql> use mysql;
mysql> update user set password=password("123") where user="root";
mysql> flush privileges;重新启动mysql服务 net start mysql 修改成功!
如果一修改为其他盘就出现1045的错误了!
按照你的做法我出现如下错误是什么意思 谢谢
C:\Program Files\MySQL\MySQL Server 5.1\bin>mysqld --defaults-file="C:\Program
Could not open required defaults file: C:\Program
Fatal error in defaults handling. Program aborted
110626 22:26:27 [Warning] Can't create test file C:\Program Files\MySQL\MySQL Se
rver 5.1\data\microsof-679b67.lower-test
110626 22:26:27 [Warning] Can't create test file C:\Program Files\MySQL\MySQL Se
rver 5.1\data\microsof-679b67.lower-test
mysqld: Can't change dir to 'C:\Program Files\MySQL\MySQL Server 5.1\data\' (Err
code: 2)
110626 22:26:27 [ERROR] Aborting110626 22:26:27 [Note] mysqld: Shutdown complete
C:\Program Files\MySQL\MySQL Server 5.1\bin>Files\MySQL\MySQL Server 5.1\my.ini"
--console --skip-grant-tables
系统找不到指定的路径。C:\Program Files\MySQL\MySQL Server 5.1\bin>
基本上的安装步骤大家都清楚,如果出现上述的安装错误,先在控制面板删除,在到安装路径删除
1、改变安装路径
2、其他安装照旧
3、在please set the windows service(这个页面选取:Include bin directory in windows path)
4、进行下一步就可以了!
如果在添加密码时有三个框,都填一样就可以了!
C:\Documents and Settings\tony>net stop mysql
MySQL 服务正在停止.
MySQL 服务已成功停止。进入bin目录
C:\Documents and Settings\tony>cd C:\Program Files\MySQL\MySQL Server 5.0\bin
C:\Program Files\MySQL\MySQL Server 5.0\bin>mysqld-nt --skip-grant-tables
重新打开一个命令提示符窗口
进入bin目录
C:\Program Files\MySQL\MySQL Server 5.0\bin>mysql
mysql> use mysql;这样,查看user表信息,更改user表,随便你怎么改
1045 - access deied for user:'root@localhost'(using password:yes)
这样的错误提示信息,当我看到这个贴的时候我就是开启了那个mysql51那个服务就可以了,
因为他是任务管理器里面有两服务的,一个是mysql服务另一个就是mysql51了,然而我安装的时候选择
的就是mysql51了,而系统启动的时候就是默认开启了,第一个服务的即mysql,结果我就,结束mysql
服务而开启第二个服务mysql51就没有问题了,正常打开了。
只有一个mysql啊,哪里有mysql51