Chinaunix

标题: mysql [打印本页]

作者: nese    时间: 2011-12-20 09:46
标题: mysql

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');






欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2