mysql安装和常见问题

 

1.linux系统下mysql跳过密码验证登录和创建新用户

   1.vim /etc/my.cnf //打开配置文件
   2.在[mysqld]的段中加上一句:skip-grant-tables
   3.:wq保存退出 systemctl restart mysqld //重启mysql
   4.就可以直接进mysql了 然后进去修改密码,改完flush privileges; //刷新MySQL的系统权限
   5.在将刚才在[mysqld]的段中加上的skip-grant-tables删除 最后再重启mysql

2.【mysql】You must reset your password using ALTER USER statement before executing this statement.

操作前你必须重置密码: 操作指令   alter user user() identified by '密码';     

密码:'默认是8位 ,包含大小写数字特殊符号',不然回报下面这个密码策略错误问题

Your password does not satisfy the current policy requirements   //您的密码不满足当前策略的要求

3.ERROR 1130: Host '192.168.1.3' is not allowed to connect to thisMySQL serve

  不让远程连接  被连接的数据不允许使用 192.168.1.3访问,只允许是用 localhost;

处理方法:

总体运行语句:

mysql -u root -p    //登录

mysql>use mysql;   //打开mysql数据库

mysql>select 'host' from user where user='root';   //查看host

mysql>update user set host = '%' where user ='root';  //修改host% 所有都能访问

mysql>flush privileges;   //刷新MySQL的系统权限

mysql>select 'host'   from user where user='root';

4.开放mysql权限

 grant all on *.*  to  'root'@'%'  identified  by  'root';  

5.阿里服务器网络添加入口3306端口

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值