您的位置:首页 > 教育 > 培训 > 北京财优化_黄页88网官网首页_seo美式_seo流量增加软件

北京财优化_黄页88网官网首页_seo美式_seo流量增加软件

2025/2/26 13:54:18 来源:https://blog.csdn.net/CSDN_Black/article/details/144086639  浏览:    关键词:北京财优化_黄页88网官网首页_seo美式_seo流量增加软件
北京财优化_黄页88网官网首页_seo美式_seo流量增加软件

参考:cubuntu安装mysql5.6_mob649e81553a70的技术博客_51CTO博客

问题1:sudo apt install mysql-server-5.7 -y 若提示mysql-server 没有可安装候选

答:

sudo nano /etc/apt/sources.list

在开头加入:

#  阿里源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

更新后即可安装:

sudo apt-get update

问题2:安装完成后,mysql -u root -p命令提示Access denied for user 'root'@'localhost'

root没有设置初始密码,先强行进入mysql再修改表设置密码

sudo mysql

mysql5.7

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new_password';
FLUSH PRIVILEGES;
 

mysql 8

ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'new_password';
FLUSH PRIVILEGES;
 

问题3:如何设置mysql的开机启动

sudo systemctl enable mysql

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com