-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathJDBC Setup
54 lines (27 loc) · 1.09 KB
/
JDBC Setup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Installation oF Database - MYSQL
Ear & MYSQL DB: https://drive.google.com/drive/folders/1x7yUGOtzKZiNzjQB3uZ7swKJiwZpGZOI?usp=sharing
sudo yum -y install mysql-server.x86_64
service mysqld start
mysqladmin -u root password password
mysql -uroot -ppassword
mysql -uroot -ppassword < /opt/software/mysql/world.sql
show databases;
use world;
show tables;
select * from city;
select * from country;
GRANT ALL PRIVILEGES ON world.* TO 'root'@'localhost';
##- SELECT, INSERT, DELETE or database.tablename or 'user'@'%'
FLUSH PRIVILEGES;
SHOW GRANTS FOR 'root'@'localhost';
GRANT ALL PRIVILEGES ON world.* TO 'root'@'%';
FLUSH PRIVILEGES;
##- If you managed to remove the permission this will restore it.
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
-Create a user for the hostname
create user 'root'@'wls-host1' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'wls-host1' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON world.* TO 'root'@'wls-host1' WITH GRANT OPTION;
FLUSH PRIVILEGES;
======================
update city set Population='200' where Name='Chennai';