52AV璈A|52AV.ONE

 曉撖蝣
 蝡唾酉
敹急瑕
  • av隢憯BBS
  • 璈A
  • 芣瑟憭瘚
  • 鞎澆
  • 52av鋆貉摰
  • 銝剜-銝剖銝餅
     
亦: 3582|敺: 0
銝銝銝駁 銝銝銝駁

[mysql] Mysql 閮剖Login

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2015-6-21 23:10:33 | 芰閰脖 撣 |摨閬 |梯璅∪
摰鋆摰Mysql 敺閮剖 :! R' l' C' Z5 e8 \& X" E! z/ |
脖甇亥身摰 MySQL: Q% o5 F% V+ S$ K! o3 h: L
A.
. Q' B& A! V% [& c' [8 Q, g4 H閮剖php.ini(/etc/php.ini)
" s5 ^  O6 }! G3 |6 c% Lphp.ini4 z0 N0 M2 k; S) f' F6 G# R$ [' t
1 memory_limit = 128M               //PHP舐刻園銝! K' Q$ j. J9 j9 P. \3 d& I4 ]
2 display_errors = Off              //憿舐內航炊閮
7 |- p* U* b8 I: F, u* I6 ?3 date.timezone = Asia/Taipei       //(銵閬閮剖嚗銝賀HP雿輻典唳賣豢航炊閮)
" e( a3 E+ n" }* w. r+ t4 session.cookie_lifetime = 0       //session摮瘣餅(桐蝘嚗0隞銵典瘣餉喟閬賢券)
, s/ [0 Y# I: b9 M
4 ?! `9 X2 p8 D# MB.* A' K# r- g. G3 Y  d" o
閮剖my.cnf(/etc/my.cnf)' O1 k* p% t9 n9 z3 r
my.cnf : 6 O1 H  D9 V  p( S
1 log-error=/var/log/mysqld.log     //亥摮曆蝵( b, j6 q6 r4 U
2 connect_timeout = 15              //蝺timeout4 }' n2 O$ D: p- p3 a6 s; R
3 max_connections = 3000            //憭折蝺- t2 [0 {" V5 _; u4 l
4. service mysqld  restart
" U4 \0 \7 ^( Q. u2 R/ n, n9 }! V; z7 ]2 h& a% l# R) d

: J" C: N1 Z0 y! s7 A# H/ r) v" AC.
$ A: N! E' N% F  s; x! o# G$ z閮剖 MySQL 鞈摨怎恣 root 撣單嗥撖蝣潘瑁sudo mysql_secure_installation嚗隞雿摨銝撟曆辣鈭
; r- o' ^& I* p1 T! f1. Enter current password for root (enter for none):  // 湔交 Enter嚗粹閮剜撖蝣3 w0 b1 O$ i2 W
2. Set root password? [Y/n]                     //頛詨  Y 靘閮剖撖蝣
2 R$ k8 I4 H9 a2 q$ C4 {( C3. New password:                                  // 頛詨 root 啣蝣
: I/ }, E, D" S1 u4. Re-enter new password:                      // 銝甈∟撓 root 啣蝣
) f' o3 h5 H, n+ \% @5. Remove anonymous users? [Y/n]          //閮 Yes 嚗湔交 Enter  Y7 H; x; O; L* J5 S
6. Disallow root login remotely? [Y/n]       //閮 Yes 嚗湔交 Enter* z8 h( Q- A" c5 M
7. Remove test database and access to it? [Y/n]    //閮 Yes 嚗湔交 Enter
8 ^1 m. `. {5 z  A8. Reload privilege tables now? [Y/n]       //閮 Yes 嚗湔交 Enter! Y: F( b* ?- g
8 q; ]7 G5 v" d, o1 T! z5 @

$ U! j/ s' y% G+ [. l亥拍典閮剖 root 撖蝣潛餃 MySQL嚗瑁sudo mysql -u root -p嚗撖蝣潭迤蝣箏停脣乓mysql>璅蝷箇泵
/ F# x6 C$ P* g 瑁豢閬券鞈摨; W* l* k# D& P$ H& \" i
mysql> use mysql
  w8 R5 l2 Q8 v' E1 U  h8 z3 k% U9 c1 c
瑁select host,user from user ;閬蝯撠暹瑁
' s  |' |2 o5 u# O5 B! P& k9 g/ v6 Gmysql> select host,user from user ;
3 J; O/ ]1 D9 B0 I$ n6 c3 e" p+-----------+------+
- U4 R* q" w( f& V# A- N; A. M7 A| host      | user |. e# z# q2 p) i5 ^' K/ w6 }5 y
+-----------+------+# x+ G+ u$ U2 z6 @% Q5 r3 `
| 127.0.0.1 | root |
' l: p& f0 j) |( z5 Q. H) m9 W| localhost | root |
3 m9 `# E! O5 M8 C  d: Q+-----------+------+8 r, s6 K% {0 A* r
2 rows in set (0.00 sec)7 `2 i+ i: g4 g2 e- q
( F) y/ E. d7 z2 F( T/ D* G* Q
啣銝雿輻刻& }; T9 t0 b0 b5 e  M
insert into user (host,user,password) values ('%','your_account',password('your_password'));
1 |/ b0 X7 g% |, U8 D4 O2 D/ h7 I7 {$ ~* U, c& G6 i0 _
餅閰脖蝙刻蝞∠甈嚗璅雿賣颲行蝡航 嚗 root 蝡舐餃亥◤鈭嚗
" X/ J8 n' j( ?! o- J3 NGRANT ALL ON *.* TO 'your_account'@140.112.1.1 IDENTIFIED BY 'your_password' WITH GRANT OPTION;
6 N* _' r* N8 }% t0 d銝嗅撣唾嚗芣臭祈摨思蝙刻撣唾嚗銝瘝隞颱甈! G; l) z# J/ Q4 L. c- r' F5 a2 P
餉閮剖
, n1 P" T9 Q% q1 e1 X8 fFLUSH PRIVILEGES;
0 V" m2 I$ ^6 z+ `; s  b1 Y0 O摰鋆摰Phpmyadmin ,run http://www.domain.com/dbadmin   show error : The mbstring extension is missing. Please check your PHP configuration./ d; I% u: d% x  C. ^! |& X. ?
隢摰鋆9 `9 z/ h3 z( v0 c% P+ q# e
        
6 d. z# y8 d8 m2 r2 ayum -y install php-mbstring0 ]8 K( d* K+ c8 G0 R% z
/ B9 w  T' M; T" c0 P" Y& K
亙箇曄撩撠mcrypt嚗隢摰鋆
2 d8 r) `8 s* Y4 G1 {* u! H  P        ) y( {5 F- C# V' v" M7 R
yum -y install mcrypt0 \3 n" X+ V+ I2 i) r* C
service nginx restart
' X) U/ |( w1 \; I4 [Login phpadmin 敺箇    error:蝻箏 mysqli 游憟隞嗚隢瑼X PHP 閮剖Solution:
/ {* d( [; h6 N) _" P8 A& [php -m | grep mysqli ===> confirm mysqli module is installed
! Q8 B# \' B2 ]+ K; kphp -i | grep extension_dir ===> 撠曉辣隡貊桅) g1 s; }  P5 s) n7 ~
yum -y install php-mysql ( yum install php5-mysqli)   ===> ok
" e9 v3 U1 f) z" w; D  x3 N蝻箏 mcrypt 游憟隞嗚隢瑼X PHP 閮剖2 n2 `9 g! i8 W  T
yum install php-mcrypt. u3 \8 x8 N- Z. f; B
yum install libmcrypt libmcrypt-devel   ===> ok: C3 k! ?" R+ Y( {# p3 ~/ h: i

# N  T4 T1 d! K, ?+ h* u" Z' T; [" C' i# L; S; M7 C# x7 s5 k- Q

雿輻券

祉蝛閬

BT蝳

砍憛批捆靘餉衣雯頝臬批捆蝝颲行粹嗥蝬脩嚗摰撟湔遛嚗嚗甇脖誑銝嗅啣摰嗆摰撟湧翩鈭箏ㄚ孵舫脣伐銝憿亙祉璇甈橘芣遛18甇 雓蝯脣亦閬賬粹脩芣遛18甇脖芣撟渡雯閬賜雯頝臭嗥批捆鞈閮嚗撱箄降典舫脰蝬脰楝批捆蝝蝯蝜ICRA蝝摰鋆閮剖 (粹蝯行霅 祉蝬脣銝蝝瘛函隢憯啣嚗祉閮剜蝞∠)

QQ|撠暺撅||52AV璈A

GMT+8, 2024-11-22 15:55 , Processed in 0.060595 second(s), 16 queries .

蝯∠.撱

[email protected] | QQ:2405733034     since 2015-01

鋆貉憒 敹恍敺 餈銵