树莓派安装mysql
2024-09-20 19:27:19
首先我想启用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>
最新文章
- C#.NET 大型通用信息化系统集成快速开发平台 4.0 版本 - 标准省市县数据的公司选择窗口实现
- 17 任务调度相关类综述——Live555源码阅读(一)任务调度相关类
- [2011山东ACM省赛] Sequence (动态规划)
- css初始化代码方案
- android系统平台显示驱动开发简要:Samsung LCD接口篇『三』
- Error parsing XML: not well-formed (invalid token)
- [CSAPP笔记][第十二章并发编程]
- struts2图片显示
- 调用startActivityForResult后,onActivityResult为什么立刻响应
- java游戏开发杂谈 - 线程
- sqoop错误集锦2
- JavaScript lastIndexOf() 方法
- 微信小程序scroll-view 横向和纵向scroll-view组件
- C# 重启exe
- gdb 不同位置,函数调用参数显示差异
- day02-格式化输出
- idea插件推荐
- C# read write ini file
- EF和LINQ 调用存储过程
- editcap的使用
热门文章
- jquery选择器:nth-child()与空格:eq() 的区别;
- bzoj 1046 : [HAOI2007]上升序列 dp
- hdu 4349 Xiao Ming's Hope lucas
- [LeetCode]题解(python):122-Best Time to Buy and Sell Stock II
- (Problem 62)Cubic permutations(待续)
- excel读入数据库
- Aptana jQuery自动提示
- ORA-20000:ORU-10027:buffer overflow,limit of 10000 bytes错误4
- 定位CPU高的方法
- [置顶] js操作iframe兼容各种浏览器