MySql 错误

  1. ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost’ (10061)
    服务没有启动。
  2. 发生系统错误 5。拒绝访问。
    以管理员身份来运行cmd
  3. ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
    corresponds to your MySQL server version for the right syntax to use near ‘datab
    ases;
    语法错误,可能是输入法为中文的问题;
  4. 1045 access denied for user ‘root’@’localhost’ (using password no) )
    这个错误是由于我在Navicat中修改了root的密码的缘故(刚安装好MYSQL,超级用户root是没有密码的),直接将密码删除即可。
    以管理员登录cmd;
    输入:net start mysql
    输入:mysql -u root -p //有密码就输入密码
    输入:update user set password=” where user=’root’;
    重新启动下mysql服务就可以啦

*一、密码的修改:使用mysqladmin命令
1、例如你的 root用户现在没有密码,你希望的密码修改为abc,那么命令是:mysqladmin -u root password abc (不需登录进去mysql)
2、如果你的root现在有密码了,那么修改密码为abc的命令是:mysqladmin -u root -p password youyou
注意,命令回车后会问你旧密码,输入旧密码之后命令完成,密码修改成功。
二、密码的消除
1、以root登录:mysql -u root -p
2、mysql>use mysql;
3、mysql>update user set password=” where user=’root’;
重新启动下mysql服务就可以啦*
5. 忘记密码
11. 停止服务
22. mysqld –skip-grant-tables
33. 另外一个cmd:mysql -u root
44. select host,user,password from mysql.user;//即可查看到用户和密码
55. update mysql.user set password=” where user=’root’;//设置空密码
66. net start mysql;//启动mysql服务
6. 1290-The MySQL server is running with the –skip-grant-tables option so it cannot execute this statement
在命令行输入:mysql> flush privileges; //权限问题

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值