zoukankan      html  css  js  c++  java
  • 解决centos7.0安装mysql后出现access defind for user@'localhost'的错误

    在使用yum 安装完mariadb, mariadb-server, mariadb-devel后

    1. rpm -qa | grep maria   查看maria相关库的是否在进程中

    2. netstat -tulp 查看网络服务软件的进程列表,mysql是否在(yum install net-tools 安装netatat等网络分析工具)

    3. mysql_secure_installation    设置安全mysql,设置mysql系统的root权限密码,默认为空

    4. 以上当设置密码时出现"access defind for user@'localhost'"类似的错误,则可使用一下方法。

        (1). mysql -uroot -p  回车空密码登录进mysql系统

        (2). set password for 'root'@'localhost' = password('你的密码'); 当前就设置密码回车

        (3). 然后再mysql -uroot -p使用刚才的密码登录进去,show databases; 查看系统系统的数据库列表

    5. grant all privileges on *.* to 'root'@'%' identfied by '你的数据库系统密码';   设置mysql的远程连接

        grant all privileges on 库名.表名 to '用户名'@'IP地址' identified by '密码' with grant option;

    公众号

  • 相关阅读:
    计算机组成原理学习总纲图
    USE RED
    既有的问题如何解决
    字符串极值题解
    扩展 KMP
    KMP
    FHQ-Treap
    STL
    iOS内存管理理论知识过一遍
    iOS中Block理论知识过一遍
  • 原文地址:https://www.cnblogs.com/zerofc/p/10577319.html
Copyright © 2011-2022 走看看