树莓派安装MySQL数据库

出处:

1、https://blog.csdn.net/huayucong/article/details/49736427

2、https://www.imooc.com/article/23132?block_id=tuijian_wz

3、http://www.runoob.com/mysql/mysql-install.html(Debian系统)

4、https://blog.csdn.net/faryang/article/details/50788795(树莓派系统)

测试:

没有找到bind_address信息


安装正常后,设置防火墙时,port 22端口没有开启成功,结果reboot树莓派后,不能ssh登陆了,尴尬,

重新ufw allow 22端口后,才可以登陆ssh。

再次使用Mysql时,

Mysql -u root -p

出现“mysql access denied for user 'root'@'localhost' ”

幸好找到方法:

step 1 ://首先停止当前的mysql服务: /etc/init.d/mysql stop (service mysqld stop )

step 2: //设置Mysql免密登录,等同恢复初始时的状态 (  ̄  ̄)σ…( _ _)ノ|壁 sudo mysqld_safe --skip-grant-tables&

step 3: //另外开个终端: //进入mysql并且以root账户进入“mysql”数据库 

sudo mysql --user=root mysql update user set Password=PASSWORD('new-password'); 

flush privileges;

exit; 



猜你喜欢

转载自blog.csdn.net/u011270542/article/details/80023873