zoukankan      html  css  js  c++  java
  • 树莓派安装mysql

    首先我想启用root用户,所以我先启用root用户:

    sudo passwd root

    这里会提示输入两次密码,然后:

    sudo passwd --unlock root

    这样就可以启动root登录,如果想立马使用root,可以:

    su root

    这样就可以直接切换到root用户不过会提示输入密码,如果下次用root登录的话就会在登录的时候显示设置画面,如果你只是玩玩就可以不用管这个。

    接下来要安装mysql,安装之前可以先更新下本机软件:

    sudo apt-get update

    然后就是等待了。等待完之后要准备安装mysql了,命令直接安装:

    sudo apt-get install mysql-server

    然后就是等待,在安装的过程中会提示你让你输入mysql的root密码,会提示两次。输入完成之后就会安装成功了。

    然后输入如下命令进入mysql:

    mysql -u root -p

    然后会提示输入密码,输入密码就可以进入mysql:

     1 root@raspberrypi:/home/pi# mysql -u root -p
     2 Enter password:
     3 Welcome to the MySQL monitor.  Commands end with ; or g.
     4 Your MySQL connection id is 43
     5 Server version: 5.5.35-0+wheezy1 (Debian)
     6 
     7 Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
     8 
     9 Oracle is a registered trademark of Oracle Corporation and/or its
    10 affiliates. Other names may be trademarks of their respective
    11 owners.
    12 
    13 Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
    14 
    15 mysql>
  • 相关阅读:
    #Leetcode# 21. Merge Two Sorted Lists
    #Leetcode# 118. Pascal's Triangle
    #LeetCode# 136. Single Number
    #Leetcode# 26. Remove Duplicates from Sorted Array
    #LeetCode# 167. Two Sum II
    #Leetcode# 58. Length of Last Word
    #LeetCode# 35. Search Insert Position
    POJ 2492 J-A Bug's Life
    #Leetcode# 27. Remove Element
    【前端】.easyUI.c#
  • 原文地址:https://www.cnblogs.com/jsben/p/4761901.html
Copyright © 2011-2022 走看看