-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathinstall-notes.txt
More file actions
executable file
·46 lines (31 loc) · 1.26 KB
/
install-notes.txt
File metadata and controls
executable file
·46 lines (31 loc) · 1.26 KB
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
# My SQL Installation
## Check Installation
#check mysql installation
systemctl status mysql
systemctl enable mysql
systemctl start mysql
mysqladmin -u root password "<YOUR PASSWORD>"
or (if you need to change password)
mysqladmin -u root -p'oldpassword' password "<YOUR PASSWORD>"
mysql -u root -p"<YOUR PASSWORD>"
## Create database & user
CREATE DATABASE enisoinfodb DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE USER 'enisoinfouser'@'localhost' IDENTIFIED BY "<YOUR PASSWORD>";
GRANT ALL PRIVILEGES ON enisoinfodb . * TO 'enisoinfouser'@'localhost';
FLUSH PRIVILEGES;
CREATE DATABASE enisoinfodb2 DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES ON enisoinfodb2 . * TO 'enisoinfouser'@'localhost';
FLUSH PRIVILEGES;
## Check Installation
mysqldump -u MY_USERNAME -pMY_PASSWORD -databases MY_DATABASE_NAME | gzip > MY_DATABASE_NAME-`date +%Y%m%d`.sql.zip
## drop all tables
SET FOREIGN_KEY_CHECKS = 0;
SET @tables = NULL;
SELECT GROUP_CONCAT(table_schema, '.', table_name) INTO @tables
FROM information_schema.tables
WHERE table_schema = 'enisoinfodb'; -- specify DB name here.
SET @tables = CONCAT('DROP TABLE ', @tables);
PREPARE stmt FROM @tables;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
SET FOREIGN_KEY_CHECKS = 1;