zoukankan      html  css  js  c++  java
  • debian安装 mysql

    1. 配置安装源

    wget https://dev.mysql.com/get/mysql-apt-config_0.8.17-1_all.deb
    sudo dpkg -i mysql-apt-config_0.8.17-1_all.deb
    

    2. 安装

    sudo apt install mysql-server
    

    配置 root远程登陆

    root@deb10:~# mysql --user=root -p
    Enter password: 
    Welcome to the MySQL monitor.  Commands end with ; or g.
    Your MySQL connection id is 27
    Server version: 8.0.25 MySQL Community Server - GPL
    
    Copyright (c) 2000, 2021, Oracle and/or its affiliates.
    
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    
    Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
    
    mysql> select Host,User from user;
    ERROR 1046 (3D000): No database selected
    mysql> use mysql
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Database changed
    mysql> select Host,User from user;
    +-----------+------------------+
    | Host      | User             |
    +-----------+------------------+
    | %         | root             |
    | localhost | mysql.infoschema |
    | localhost | mysql.session    |
    | localhost | mysql.sys        |
    | localhost | root             |
    +-----------+------------------+
    5 rows in set (0.01 sec)
    mysql> create user 'root'@'%' indetified by '';
    mysql> grant all privileges on *.* to 'root'@'%' with grant option;
    mysql> flush privileges;
    
  • 相关阅读:
    python 中的深拷贝和浅拷贝
    时间复杂度
    为什么l1和l2可以防止过拟合
    逻辑回归实现多分类
    《深入浅出数据分析》读书笔记
    牛客网的输入和输出
    万物皆可embedding
    NLP中的mask的作用
    不同语言对单例模式的不同实现
    ElasticSearch 索引 VS MySQL 索引
  • 原文地址:https://www.cnblogs.com/microestc/p/14793330.html
Copyright © 2011-2022 走看看