https://www.cnblogs.com/duanrantao/p/8988116.html
chkconfig 命令现在替换为sysv-rc-conf
Ubuntu下安装sysv-rc-conf报错:ubuntuE: Unable to locate package sysv-rc-conf
解决方法
在软件源列表sources.list(该文本的位置在/etc/apt/sources.list)文件中的末尾添加如下内容:
deb http://archive.ubuntu.com/ubuntu/ trusty main universe restricted multiverse
添加完后更新apt-get,在终端输入sudo apt-get update
更新完成后重新安装sudo apt-get install sysv-rc-conf
参见:https://blog.csdn.net/weixin_44606513/article/details/86815190
安装sysv-rc-conf
sudo apt-get install sysv-rc-conf
sudo chmod 700 /etc/init.d/mysql
sudo sysv-rc-conf mysqld on
sudo sysv-rc-conf --level 2345 mysqld on
sudo chown mysql:mysql -R /opt/mysql/
修改sql密码为123456
./mysqladmin -h 127.0.0.1 -P3306 -uroot password '123456'
root用户登陆mysql命令:mysql -u root -p
mysql执行sql文件
mysql>source blog.sql
mysql启动 service mysql start
遇到acess deny问题时参见:https://www.cnblogs.com/cpl9412290130/p/9583868.html