• Centos7安装mysql遇到的一些问题


    mysql安装

    • 下载数据库(rpm文件)
    • 安装软件源 rpm -Uvh mysql57-community-release-el7-10.noarch.rpm
    • 安装mysql服务端 yum install -y mysql-community-server
    • 修改密码 ALTER USER 'root'@'localhost' IDENTIFIED BY 'ROOT_root123';
    • 授权其他机器可登陆
      GRANT ALL PRIVILEGES ON . TO 'root'@'%' IDENTIFIED BY 'ROOT_root123' WITH GRANT OPTION;
      FLUSH PRIVILEGES;

    安装MySQL出现Job for mysqld.service failed because the control process exited with error code问题

    • 删除/var/lib/mysql /后重启MySQL服务就可以了!

    用navicat连接数据库报错:1130-host ... is not allowed to connect to this MySql server如何处理

    1、连接服务器: mysql -u root -
    2、看当前所有数据库:show databases;
    3、进入mysql数据库:use mysql;
    4、查看mysql数据库中所有的表:show tables;
    5、查看user表中的数据:select Host, User,Password from user;
    6、修改user表中的Host:update user set Host='%' where User='root';
    7、最后刷新一下:flush privileges;

    • use mysql;
    • ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'ROOT_root123';
  • 相关阅读:
    java 代码规范 sun 公司
    软引用、弱引用、虚引用
    socket
    httpURLConnection、URL、httpClient、httpPost、httpGet
    android service aidl 理解
    Python2.7-codecs
    Python2.7-textwrap
    Python2.7-StringIO和cStringIO
    Python2.7-difflib
    Python2.7-struct模块
  • 原文地址:https://www.cnblogs.com/puxuebing/p/11344809.html
Copyright © 2020-2023  润新知