使用mysql++链接数据库的使用与bug
一.Ubuntu中MySQL的安装与配置
1.安装
sudo apt install -y mysql-server mysql-client libmysqlclient-dev
cat /etc/mysql/debian.cnf # 获取密码
mysql -udebian-sys-maint -p # 输入上面现实的密码
use mysql;
alter user "root"@"localhost" identified with mysql_native_password by "新密码"; # 设置root密码
flush privileges;
update user set host='%' where user='root'; # 设置远程链接
flush privileges;
exit # 退出mysql
sudo gedit /etc/mysql/mysql.conf.d/
共有 0 条评论