ubuntu系统初始化网络及mysql配置

安装系统时需要安装open-ssh服务软件,否则无法远程连接


1、修改root密码
# sudo passwd
输入密码即可


切换到root用户,需要输入刚才的root密码
# su -


2、配置网络:
# vim /etc/network/interfaces


auto eth0
iface eth0 inet static
address 192.168.8.51
netmask 255.255.255.0
gateway 192.168.8.254


3、重启网卡服务(此时就可以通过ssh客户端连接了)
# /etc/init.d/networking restart


mysql数据库


数据库密码参考 /etc/mysql/debian.cnf 的文件

用debian-sys-maint登录,密码就是debian.cnf里那个,是明文的


使用下面命令即可登录
# mysql -u debian-sys-maint -pfiI5TkPuMrK79kYk

原文地址:https://www.cnblogs.com/reblue520/p/6239783.html