前言
都2025年了还在自学JAVA后台开发?作为一个iOS、Android、前端开发的我为了全栈之路,开干!!!
拥有Android开发的JAVA基础相信学习起来并不困难。
学习网站研究
JDK安装: https://www.oracle.com/cn/java/technologies/downloads/#jdk17-windows
IntelliJ Idea安装: https://www.jetbrains.com.cn/idea/
maven: https://maven.apache.org/download.cgi
SpringBoot: https://spring.io/
Tomcat: https://tomcat.apache.org/
https://mybatis.org/mybatis-3/zh_CN/index.html
MYSQL: https://downloads.mysql.com/archives/community/
JAVA入门的学习
学习视频(免费): 含Java项目和java真题
- 拥有Android开发的JAVA基础直接跳过JAVA教程,进入数据库的学习
MYSQL的学习
教程: http://www.codebaoku.com/it-db/it-db-20246.html
设置环境变量:MYSQL_HOME(安装目录)和新建path(%MYSQL_HOME%\bin)
命令行:
1:mysql
显示:ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost:3306' (10061)
2:mysqld --initialize-insecure
在MySQL安装目录会生成一个文件夹data
3: mysqld -install
电脑搜索服务,进入服务看到MySql服务(开机自启动)
4:net start mysql
显示:
MySQL 服务正在启动 ..
MySQL 服务已经启动成功。
5:net stop mysql
显示:
MySQL 服务正在停止.
MySQL 服务已成功停止。
6: 修改默认账号密码
mysqladmin -u root password 123456
显示:
mysqladmin: [Warning] Using a password on the command line interface can be insecure.
Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety.
7:登录MySQL(mysql -h【主机地址】 -u【用户名】 -p【密码】)
mysql -uroot -p123456 或 mysql -uroot -p(按回车输入密码)
显示:
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.31 MySQL Community Server - GPL
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
8: 退出
exit
9: 退出数据库和停止 MySQL 服务
quit
创建数据库
10:create database db01; create database db02; create database if not exists db03;
显示所有数据库
11:show databases;
使用数据库
12:use db01;
查看当前使用的数据库
13: select database();
删除数据库
14:drop database db03;
-- 创建数据库
create database db01;
create database db02;
create database if not exists db03;
-- 显示所有数据库
show databases;
-- 使用数据库
use db01;
-- 查看当前使用的数据库
select database();
-- 删除数据库
drop database db03;
/*
create table 表名(
字段1 数据类型 [comment 字段1注释],
......
字段n 数据类型 [comment 字段n注释]
) [comment 表注释]
*/
create table tb_user_default (
id int comment 'ID,唯一标识',
username varchar(20) comment '用户名',
name varchar(10) comment '姓名',
age int comment '年龄',
gender char(10) comment '性别'
) comment '用户表';
create table tb_user (
id int primary key comment 'ID,唯一标识',
username varchar(20) not null comment '用户名',
name varchar(10) not null comment '姓名',
age int comment '年龄',
gender char(10) default '男' comment '性别'
) comment '用户表';
-- 删除表
drop table tb_user_default;
drop table td_user;
Javaweb开发学习
学习视频(免费): 涵盖Spring+MyBatis+SpringMVC+SpringBoot等
- 目前刚学到Mybatis入门