myql入门

目录

  • 安装
  • 修改密码
  • 学习资料
    • 个人git仓库
    • 文章
    • 视频
    • 官网

安装

#移除以前的mysql相关
sudo apt remove --purge mysql-\*
#安装mysql
sudo apt install mysql-server mysql-client
#查看是否启动
systemctl status mysql
#手动启动
systemctl start mysql
#查看mysql版本
mysql --version

修改密码

#免密进入mysql
sudo mysql -uroot
#your_new _password 修改成用户密码
alter user 'root'@'localhost' identified with mysql_native_password by 'your_new _password';
#然后就可以使用密码登录了
mysql -u root -p

use mysql;
#root账号可以访问所有主机
update user set host='%' where user= 'root';
#ERROR 1046 (3D000): No database selected
flush privileges;
#授权
grant all on *.* to 'root'@'%';
flush privileges;
quit;

学习资料

个人git仓库

文档,资料: https://gitee.com/fedorayang/database.git

文章

  • Ubuntu22.04安装mysql: https://blog.csdn.net/c_learner_/article/details/125238004
  • ubuntu22.04安装mysql: [https://www.cnblogs.com/angbors/p/17189610.html
  • 学习mysql: https://www.runoob.com/mysql/mysql-tutorial.html
  • 学习sql: https://www.runoob.com/sql/sql-tutorial.html
  • 在 Ubuntu 上安装和配置 MySQL 保姆级教程: https://zhuanlan.zhihu.com/p/610793026

视频

  • 一小时MySQL教程: https://www.bilibili.com/video/BV1AX4y147tA?vd_source=a795ec50b290a151c69819df1d6cb37a

  • 黑马程序员 MySQL数据库入门到精通,从mysql安装到mysql高级、mysql优化全囊括: https://www.bilibili.com/video/BV1Kr4y1i7ru?vd_source=a795ec50b290a151c69819df1d6cb37a

官网

MySQL官网: https://www.mysql.com/

你可能感兴趣的:(数据库,MySQL)