前言
都2025年了還在自學(xué)JAVA后臺(tái)開發(fā)?作為一個(gè)iOS着茸、Android、前端開發(fā)的我為了全棧之路琐旁,開干d汤!灰殴!
擁有Android開發(fā)的JAVA基礎(chǔ)相信學(xué)習(xí)起來并不困難敬特。
學(xué)習(xí)網(wǎng)站研究
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入門的學(xué)習(xí)
學(xué)習(xí)視頻(免費(fèi)): 含Java項(xiàng)目和java真題
- 擁有Android開發(fā)的JAVA基礎(chǔ)直接跳過JAVA教程掰邢,進(jìn)入數(shù)據(jù)庫(kù)的學(xué)習(xí)
MYSQL的學(xué)習(xí)
教程: http://www.codebaoku.com/it-db/it-db-20246.html
設(shè)置環(huán)境變量: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安裝目錄會(huì)生成一個(gè)文件夾data
3: mysqld -install
電腦搜索服務(wù),進(jìn)入服務(wù)看到MySql服務(wù)(開機(jī)自啟動(dòng))
4:net start mysql
顯示:
MySQL 服務(wù)正在啟動(dòng) ..
MySQL 服務(wù)已經(jīng)啟動(dòng)成功伟阔。
5:net stop mysql
顯示:
MySQL 服務(wù)正在停止.
MySQL 服務(wù)已成功停止辣之。
6: 修改默認(rèn)賬號(hào)密碼
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【主機(jī)地址】 -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: 退出數(shù)據(jù)庫(kù)和停止 MySQL 服務(wù)
quit
創(chuàng)建數(shù)據(jù)庫(kù)
10:create database db01; create database db02; create database if not exists db03;
顯示所有數(shù)據(jù)庫(kù)
11:show databases;
使用數(shù)據(jù)庫(kù)
12:use db01;
查看當(dāng)前使用的數(shù)據(jù)庫(kù)
13: select database();
刪除數(shù)據(jù)庫(kù)
14:drop database db03;
-- 創(chuàng)建數(shù)據(jù)庫(kù)
create database db01;
create database db02;
create database if not exists db03;
-- 顯示所有數(shù)據(jù)庫(kù)
show databases;
-- 使用數(shù)據(jù)庫(kù)
use db01;
-- 查看當(dāng)前使用的數(shù)據(jù)庫(kù)
select database();
-- 刪除數(shù)據(jù)庫(kù)
drop database db03;
/*
create table 表名(
字段1 數(shù)據(jù)類型 [comment 字段1注釋],
......
字段n 數(shù)據(jù)類型 [comment 字段n注釋]
) [comment 表注釋]
*/
create table tb_user_default (
id int comment 'ID,唯一標(biāo)識(shí)',
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,唯一標(biāo)識(shí)',
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開發(fā)學(xué)習(xí)
學(xué)習(xí)視頻(免費(fèi)): 涵蓋Spring+MyBatis+SpringMVC+SpringBoot等
- 目前剛學(xué)到Mybatis入門