分类: Mysql/postgreSQL
2011-03-11 15:26:52
select * from admin into outfile '/home/mysql/backup/admin.dat' fields terminated by ',' enclosed by '"' lines terminated by '\n'
Win:
c:\mysql\bin>mysqld-nt ––skip-grant-tables
c:\mysql\bin>mysqld ––skip-grant-tables
my.ini
skip-grant-tables
Linux:
mysqld_safe –skip-grant-tables &
/etc/my.cnf
skip-grant-tables
=========================================
c:\mysql\bin>mysqladmin -u root flush-privileges password "newpassword"
c:\mysql\bin>mysqladmin -u root -p shutdown
mysql> update mysql.user set password=PASSWORD('新密码') where User='root';
mysqladmin -u root flush-privileges password "newpassword"
mysql> update user set Password=password('newpassword') where User='root';
mysql> SET PASSWORD FOR myuser@localhost = PASSWORD('mypasswd');