Chinaunix首页 | 论坛 | 博客
  • 博客访问: 228938
  • 博文数量: 57
  • 博客积分: 2135
  • 博客等级: 大尉
  • 技术积分: 570
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-10 13:55
文章分类

全部博文(57)

文章存档

2017年(1)

2011年(4)

2010年(4)

2009年(8)

2008年(3)

2007年(37)

我的朋友

分类: Mysql/postgreSQL

2007-08-11 22:15:30

Change password:
1 - mysqladmin -u root -p [old password] password [new password]
    Example: #mysqladmin -u root -p 111111 password 123456
2 - change the data in the table "user" on the database "mysql"
#mysql -uroot -pxxx mysql
mysql>update user set password=password('new password') where user='user';;
mysql>flush privileges;
忘记mysql的root密码:
1、结束mysql进程
2、使用参数skip-grant-tables启动mysqlmysqld -u root --skip-grant-tables &
3、登录mysql修改密码
connect to MySQL
# mysql -u [user] -p[password]
mysql>use [database];   //use which database
mysql>show databases;   //show all the database name
mysql>show tables;   //show all the table name
mysql>desc user;   //show table's structure
阅读(1073) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~