-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMySQL
More file actions
60 lines (43 loc) · 1.99 KB
/
MySQL
File metadata and controls
60 lines (43 loc) · 1.99 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
To restart mysql:-
==================
systemctl start mariadb.service
MySQL Process check:-
=====================
# mysqladmin pr -------> (mysql status)
# watch mysqladmin pr -------> (mysql watch)
# mysqladmin processlist | grep unitech_uniman | wc -l
Database Serach command:-
=========================
grep -lr "username_"
MySQL Issue:-
=============
basically, make a backup of your crashed tables. edit your /etc/my.cnf and add
innodb_force_recovery = 1
mysql> SELECT @@sql_mode;
sql_mode=""
Repair database by using command:-
==================================
myisamchk -r -f ./pluggddc_speed_test/bumb_info_latest ---------------- > ( Run command under /var/lib//mysql/ )
myisamchk --force --update-state /var/lib/mysql/pluggddc_speed_test/bumb_info_latest.MYI
myisamchk -r /var/lib/mysql/pluggddc_speed_test/bumb_info_latest.MYI
MySQL Commands:-
================
show variables like '%strict%'; ---> To Show tables premission
set global innodb_strict_mode=OFF;
mysql -u username -p domain_db < domain_db.sql
MySQL Query For creating new User:- ----> (This query work only for wordpress)
===================================
INSERT INTO `mzel8_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`,
`user_status`)
VALUES ('admin007', MD5('admin@007'), 'firstname lastname', 'admin@blalsteelshredding.com', '0');
INSERT INTO `mzel8_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`)
VALUES (NULL, (Select max(id) FROM mzel8_users),
'mzel8_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');
INSERT INTO `mzel8_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`)
VALUES (NULL, (Select max(id) FROM mzel8_users), 'mzel8_user_level', '10');
===================================================================
how to increase phpmyadmin import file size :-
==============================================
pico /usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini
post_max_size = 55M
upload_max_filesize = 55M