• linux环境下安装mysql数据库遇到的问题


    总结一句话:
    安装完mysql数据库记得授权远程登录。
     
    坑的现象:
    ERROR 1045 (28000): Access denied for user 'guoxp'@'localhost' (using password: YES)
     
    解决方案如下:
    执行前查看状态:
    MariaDB [mysql]>  select Host,User,Password from user ;
    +-----------------------+-------+-------------------------------------------+
    | Host                  | User  | Password                                  |
    +-----------------------+-------+-------------------------------------------+
    | localhost             | root  |                                           |
    | localhost.localdomain | root  |                                           |
    | 127.0.0.1             | root  |                                           |
    | ::1                   | root  |                                           |
    | localhost             |       |                                           |
    | localhost.localdomain |       |                                           |
    +-----------------------+-------+-------------------------------------------+
    6 rows in set (0.00 sec)
     
     
    授权:
    MariaDB [mysql]> grant select,update,insert,delete on *.* to guoxp@远程登录的ip地址 identified by "远程登录的密码";
    Query OK, 0 rows affected (0.00 sec)
     
    执行后查看状态:
    MariaDB [mysql]>  select Host,User,Password from user ;
    +-----------------------+-------+-------------------------------------------+
    | Host                  | User  | Password                                  |
    +-----------------------+-------+-------------------------------------------+
    | localhost             | root  |                                           |
    | localhost.localdomain | root  |                                           |
    | 127.0.0.1             | root  |                                           |
    | ::1                   | root  |                                           |
    | localhost             |       |                                           |
    | localhost.localdomain |       |                                           |
    | 远程登录的ip地址        | guoxp | *FA074CDA355DAA0D0E53ABE2885985ECEB743D7A |
    +-----------------------+-------+-------------------------------------------+
    7 rows in set (0.01 sec)
  • 相关阅读:
    Mysql命令行中文乱码的解决方法
    Office 开发版本号与版本对应关系
    问题Initial SessionFactory creation failed.org.hibernate.HibernateException: /hibernate.cfg.xml not found解决方法
    -Dmaven.multiModuleProjectDirectory system propery is not set问题解决
    错误:Unsupported major.minor version 51.0(jdk版本错误)的解决方法
    把disable maven nature后的项目,恢复菜单呈现出来(Convert to Maven Project)
    mysql免安装版配置使用
    windows下安装使用WGET
    [转]maven编译时出现读取XXX时出错invalid LOC header (bad signature)
    云计算openstack共享组件——Memcache 缓存系统
  • 原文地址:https://www.cnblogs.com/jack1208-rose0203/p/5887338.html
Copyright © 2020-2023  润新知