美文网首页
MySQL @ Ubuntu 18.04

MySQL @ Ubuntu 18.04

作者: T_K_233 | 来源:发表于2019-09-29 00:09 被阅读0次

    Step 1: Update repository index

    sudo apt-get update
    

    Step 2: Install MySQL Server with apt

    sudo apt-get install mysql-server
    

    Step 3: Verify installation

    mysql --version
    

    (reference version: 14.14)

    Step 4: Make security configurations by running the included security script

    sudo mysql_secure_installation
    

    Commands:
    sudo mysql -u root -p Start MySQL Shell
    systemctl status mysql.service Check running status
    systemctl start mysql Start MySQL Server

    Check authentication method for MySQL users

    SELECT user,authentication_string,plugin,host FROM mysql.user;
    

    Change the authentication method for root

    ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
    

    Reload grant tables

    FLUSH PRIVILEGES;
    

    Recheck authentication method for MySQL users

    SELECT user,authentication_string,plugin,host FROM mysql.user;
    

    相关文章

      网友评论

          本文标题:MySQL @ Ubuntu 18.04

          本文链接:https://www.haomeiwen.com/subject/mwvkjctx.html