zoukankan      html  css  js  c++  java
  • 宝塔面板的数据库使用

    经常忘记宝塔面板中数据库的使用,因此做特别记录。

    其中,root密码是指,账号为root的MySQL管理员密码,可以管理所有数据库;
    而testDB用户只有管理testDB数据库的权限,在数据库软件中通过该用户也只能连接到这个库。

    连接远程数据库可能会遇到的问题

    错误:ERROR 1130: Host '192.168.1.3' is not allowed to connect to thisMySQL serve

    解决办法:
    帐号不允许从远程登陆,只能在localhost。更改"mysql" 数据库里的 "user" 表里的 "host"项,从"localhost"改称"%"。

    mysql -u root -p
    mysql>use mysql;
    mysql>select 'host' from user where user='root';
    mysql>update user set host = '%' where user ='root';
    mysql>flush privileges;
    mysql>select 'host' from user where user='root';
    

    完成后重启MySQL。

  • 相关阅读:
    MySQL日志系统
    MySQL基础架构
    Java操作XML牛逼利器JDOM&DOM4J
    SAX方式解析XML
    DOM方式解析XML
    Jquery Ajax
    Jquery动画效果
    angular6新建项目
    mysql命令行使用
    git常用命令
  • 原文地址:https://www.cnblogs.com/oeong/p/15047023.html
Copyright © 2011-2022 走看看