mysql>update user set password='' where user='abc';
mysql>flush privileges;
就可以了。
也可以在授权的时候把密码设置为空.
mysql>grant all on 数据库名.* to 'abc'@localhost identified by '';
mysql>flush privileges;
就可以了。
也可以在授权的时候把密码设置为空.
mysql>grant all on 数据库名.* to 'abc'@localhost identified by '';
如果在Linux下的话
在用户目录下,如/home/用户名
建立.my.cnf文件
添加如下内容
[client]
password=你的mysql用户密码以后你每次mysql -u root 后就不用输入密码了
Windows的话好像是放在系统的根目录下,如C:\
直接回车 就可以了不用使用参数 -p使用了当然要输入空了