/Users/andrea/_magisterarbeit/korpus/clean/testkorpus/32/file7.html NN ----------------------------------------- : downloads NNS documentation NN faq JJ getting VVG help NN mailing NN lists VVZ reporting VVG bugs NNS php NN . SENT net JJ sites NNS links VVZ my PP$ php NN . SENT net JJ search NN for IN in IN the DT PHP NP Manual NP MySQL NP mysql NN affected VVD rows NNS mysql NN change NN user NN mysql NN client NN encoding VVG mysql NN close NN mysql NN connect VVP mysql NN create VV db NP mysql NN data NNS seek VVP mysql NP db NP name NN mysql NN db NP query NN mysql NN drop NN db NP mysql NN errno NN mysql NN error NN mysql NN escape NN string NN mysql NN fetch VV array NN mysql NN fetch VV assoc NN mysql NN fetch VV field NN mysql NN fetch VV lengths NNS mysql NN fetch VVP object NN mysql NN fetch VV row NN mysql NN field NN flags NNS mysql NN field NN len NP mysql NN field NN name NN mysql NN field NN seek VV mysql NN field NN table NN mysql NN field NN type NN mysql NN free JJ result NN mysql NN get VVP client NN info NN mysql NN get VVP host NN info NN mysql NN get VVP proto NP info NN mysql NN get VVP server NN info NN mysql NN info NN mysql NN insert NN id NN mysql NN list NN dbs NP mysql NN list NN fields NNS mysql NN list NN processes VVZ mysql NN list NN tables NNS mysql NN num NN fields NNS mysql NN num NN rows NNS mysql NN pconnect NN mysql NN ping NN mysql NN query NN mysql NN real JJ escape NN string NN mysql NN result NN mysql NN select JJ db NP mysql NN stat NN mysql NN tablename NN mysql NN thread NN id NN mysql NN unbuffered JJ query NN mysql NN closemysql NN create VV db NP view VV the DT version NN of IN this DT pageLast NN updated VVN . SENT Sat VVN , , 29 CD Oct NP 2005 CD mysql NN connect VVP PHP NP 3 CD , , PHP NP 4 CD , , PHP NP 5 CD mysql NN connect VVP Open VV a DT connection NN to TO a DT MySQL NP ServerDescriptionresource NP mysql NN connect VVP string NN server NN , , string NN username NN , , string NN password NN , , bool JJ new JJ link NN , , int NP client NN flags NNS Opens VVZ or CC reuses VVZ a DT connection NN to TO a DT MySQL NP server NN . SENT Parameters NNS server NN The DT MySQL NP server NN . SENT It PP can MD also RB include VV a DT port JJ number NN . SENT e SYM . SENT g NN . SENT hostname NN . SENT port NN or CC a DT path NN to TO a DT local JJ socket NN e NN . SENT g NN . SENT . SENT path NN to TO socket NN for IN the DT localhost NN . SENT If IN the DT PHP NP directive NN mysql NN . SENT default NN host NN is VBZ undefined JJ default NN , , then RB the DT default NN value NN is VBZ localhost JJ . SENT 3306 CD username NN The DT username NN . SENT Default NN value NN is VBZ the DT name NN of IN the DT user NN that WDT owns VVZ the DT server NN process NN . SENT password NN The DT password NN . SENT Default NN value NN is VBZ an DT empty JJ password NN . SENT new JJ link NN If IN a DT second JJ call NN is VBZ made VVN to TO mysql VV connect VV with IN the DT same JJ arguments NNS , , no DT new JJ link NN will MD be VB established VVN , , but CC instead RB , , the DT link NN identifier NN of IN the DT already RB opened VVN link NN will MD be VB returned VVN . SENT The DT new JJ link NN parameter NN modifies VVZ this DT behavior NN and CC makes VVZ mysql NNS connect VVP always RB open VV a DT new JJ link NN , , even RB if IN mysql NN connect VVP was VBD called VVN before IN with IN the DT same JJ parameters NNS . SENT client NN flags NNS The DT client NN flags NNS parameter NN can MD be VB a DT combination NN of IN the DT following VVG constants NNS . SENT MYSQL NP CLIENT NN COMPRESS NN , , MYSQL NP CLIENT NN IGNORE VVP SPACE NN or CC MYSQL NN CLIENT NN INTERACTIVE JJ . SENT Read VV the DT section NN about IN Table NN 2 CD for IN further JJR information NN . SENT Return NN Values NNS Returns VVZ a DT MySQL NP link NN identifier NN on IN success NN , , or CC FALSE JJ on IN failure NN . SENT ChangeLog NP VersionDescription NP 4 CD . SENT 3 LS . SENT 0 CD Added VVD the DT client NN flags NNS parameter NN . SENT 4 LS . SENT 2 LS . SENT 0 CD Added VVD the DT new JJ link NN parameter NN . SENT 3 LS . SENT 0 CD . SENT 10 CD Added NP support NN for IN . SENT path NN to TO socket NN with IN server NN . SENT 3 LS . SENT 0 CD . SENT 0 CD Added NP support NN for IN . SENT port NN with IN server NN . SENT Examples NNS Example NN 1 CD . SENT mysql NNS connect VVP example NN . SENT php NN link NN mysql NN connect VVP localhost NN , , mysql NN user NN , , mysql NN password NN . SENT if IN . SENT link NN die NN Could MD not RB connect VV . SENT . SENT mysql NN error NN . SENT echo NN Connected VVN successfully RB . SENT mysql NN close NN link NN . SENT . SENT Example NN 2 CD . SENT mysql NNS connect VVP example NN using VVG hostname NN . SENT port JJ syntax NN . SENT php NN we PP connect VVP to TO example NN . SENT com NN and CC port JJ 3307 CD link NN mysql NN connect VVP example NN . SENT com NN . SENT 3307 CD , , mysql NN user NN , , mysql NN password NN . SENT if IN . SENT link NN die NN Could MD not RB connect VV . SENT . SENT mysql NN error NN . SENT echo NN Connected VVN successfully RB . SENT mysql NN close NN link NN . SENT we PP connect VVP to TO localhost VV at IN port NN 3307 CD link NN mysql NN connect VVP 127 CD . SENT 0 CD . SENT 0 CD . SENT 1 LS . SENT 3307 CD , , mysql NN user NN , , mysql NN password NN . SENT if IN . SENT link NN die NN Could MD not RB connect VV . SENT . SENT mysql NN error NN . SENT echo NN Connected VVN successfully RB . SENT mysql NN close NN link NN . SENT . SENT Example NN 3 CD . SENT mysql NNS connect VVP example NN using VVG . SENT path NN to TO socket NN syntax NN . SENT php NN we PP connect VVP to TO localhost NN and CC socket NN e NN . SENT g NN . SENT tmp NN mysql NN . SENT sock VV variant JJ 1 CD . SENT ommit NN localhost NN link NN mysql NN connect VVP tmp NN mysql NN , , mysql NN user NN , , mysql NN password NN . SENT if IN . SENT link NN die NN Could MD not RB connect VV . SENT . SENT mysql NN error NN . SENT echo NN Connected VVN successfully RB . SENT mysql NN close NN link NN . SENT variant NN 2 CD . SENT with IN localhost NN link NN mysql NN connect VVP localhost NN . SENT tmp NN mysql NN . SENT sock VV , , mysql NN user NN , , mysql NN password NN . SENT if IN . SENT link NN die NN Could MD not RB connect VV . SENT . SENT mysql NN error NN . SENT echo NN Connected VVN successfully RB . SENT mysql NN close NN link NN . SENT . SENT NotesNote NN . SENT Whenever WRB you PP specify VV localhost NN or CC localhost NN . SENT port NN as IN server NN , , the DT MySQL NP client NN library NN will MD override VV this DT and CC try VVP to TO connect VV to TO a DT local JJ socket NN named VVN pipe NN on IN Windows NNS . SENT If IN you PP want VVP to TO use VV TCP NN IP NP , , use NN 127 CD . SENT 0 CD . SENT 0 CD . SENT 1 CD instead RB of IN localhost NN . SENT If IN the DT MySQL NP client NN library NN tries VVZ to TO connect VV to TO the DT wrong JJ local JJ socket NN , , you PP should MD set VV the DT correct JJ path NN as IN mysql NN . SENT default NN host NN string NN in IN your PP$ PHP NP configuration NN and CC leave VV the DT server NN field NN blank NN . SENT Note NN . SENT The DT link NN to TO the DT server NN will MD be VB closed VVN as RB soon RB as IN the DT execution NN of IN the DT script NN ends VVZ , , unless IN it's NNS closed VVD earlier RBR by IN explicitly RB calling VVG mysql NN close NN . SENT Note NN . SENT You PP can MD suppress VV the DT error NN message NN on IN failure NN by IN prepending VVG a DT to TO the DT function NN name NN . SENT See VV Also RB mysql JJ pconnect NN mysql NN close NN add VVP a DT note NN User NP Contributed VVD Notes NNS mysql NN connect VVP baldurien NN at IN club NN internet NN dot VVP fr NP 06 CD Oct NP 2005 CD 07 CD . SENT 13 RB There EX are VBP some DT case NN where WRB you PP will MD have VH one CD user NN , , for IN example NN root NN , , that WDT may MD use VV different JJ database NN , , for IN example NN . SENT . SENT php NN x SYM mysql NN connect VVP . SENT . SENT . SENT . SENT mysql NN select JJ db NP foo NP , , x NN . SENT some DT queries NNS on IN foo NP mysql NN select JJ db NP bar NN , , x LS . SENT some DT queries NNS on IN bar NN . SENT This DT is VBZ fine JJ in IN that DT case NN , , however RB if IN you PP would MD like VV to TO transfer VV one CD table NN from IN database NN foo NP to TO database NN bar NN , , you PP may MD do VV that IN . SENT INSERT NN INTO IN bar NN . SENT desttable JJ SELECT JJ FROM IN foo NP . SENT srctable JJ or CC CREATE VV TABLE NN But CC if IN you PP would MD like VV to TO convert VV data NNS using VVG a DT specific JJ function NN , , then RB you PP will MD rather RB use VV that IN . SENT . SENT php NN x SYM mysql NN connect VVP localhost NN , , root NN , , root NN . SENT y NP mysql NN connect VVP localhost NN , , root NN , , root NN . SENT mysql NN select JJ db NP foo NP , , x NN . SENT mysql NN select JJ db NP bar NN , , y NP . SENT q NN mysql NN query NN SELECT JJ field NN 1 CD , , . SENT . SENT . SENT , , fieldN NN FROM IN srctable NN , , x LS . SENT while IN a DT mysql NN fetch VV row NN q NN mysql NN query NN INSERT NN INTO IN bar NN VALUES NNS . SENT foo NP a DT 0 CD . SENT , , . SENT . SENT . SENT , , . SENT foo NP a DT 0 CD . SENT , , y NP . SENT . SENT This DT will MD fail VV . SENT The DT reason NN is VBZ simple JJ . SENT PHP NP will MD reuse VV the DT existant JJ connection NN for IN the DT second JJ mysql NN connect VVP , , so RB when WRB you PP will MD select VV a DT database NN on IN server NN x NN , , you PP will MD also RB select VV it PP for IN y NN , , and CC vice NN versa FW . SENT This DT is VBZ why WRB you PP have VHP to TO use VV the DT fourth JJ parameter NN to TO avoid VV this DT . SENT . SENT php NN x SYM mysql NN connect VVP localhost NN , , root NN , , root NN . SENT y NP mysql NN connect VVP localhost NN , , root NN , , root NN , , true JJ . SENT . SENT This DT way NN your PP$ script NN will MD work VV . SENT Note NN . SENT doing VVG that DT mysql NN close NN on IN x NN will MD result VV in IN closing VVG the DT connection NN for IN y NN too RB . SENT . SENT php NN x SYM mysql NN connect VVP localhost NN , , root NN , , root NN . SENT y NP mysql NN connect VVP localhost NN , , root NN , , root NN . SENT mysql NN close NN x SYM . SENT mysql NN close NN y NN . SENT server NN is VBZ already RB closed VVN . SENT contact NN at IN sonium NN dot VVP org NP 19 CD Sep NN 2005 CD 04 CD . SENT 12 CD I PP had VHD to TO use VV php NN 4 CD without IN mysql NN . SENT connect VV timeout NN but CC wanted VVD to TO check VV the DT availability NN of IN a DT database NN without IN having VHG to TO wait VV for IN 30 CD seconds NNS . SENT if IN you PP use VVP fsockopen NN with IN timeout NN and CC just RB close VV the DT connection NN after IN a DT few JJ attempts NNS the DT server NN will MD block VV your PP$ client NN . SENT this DT script NN logs VVZ you PP on RP to TO mysql NN and CC gets VVZ disconnected VVN by IN the DT server NN access NN denied VVD but CC it PP doesn't VVD block VV the DT client NN for IN future JJ connections NNS . SENT . SENT php NN host NN 127 CD . SENT 0 CD . SENT 0 CD . SENT 1 CD . SENT port NN 3306 CD . SENT timeout NN 5 CD . SENT echo VV trying VVG to TO connect VV to TO host NN on IN port JJ port NN n NN . SENT testcon NN fsockopen NN host NN , , port NN , , errno NP , , errstr NP , , timeout NN . SENT if IN . SENT testcon NN die NN database NN unavailable JJ . SENT errno NN . SENT errstr NN n NN . SENT else RB echo VVP connection NN successful JJ under IN timeout NN seconds NNS n NN . SENT echo NN quit VVD connection NN n NN . SENT in IN fread NN testcon NN , , 4096 CD . SENT echo NN server NN says VVZ . SENT in IN n NN . SENT login NN string NN out IN array NN 0 CD x SYM 26 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 01 CD , , packet NN length NN 38 CD bytes NNS without IN this DT 4 CD byte NN header NN packet NN no RB . SENT 1 CD 0 CD x SYM 85 CD , , 0 CD xa NN 6 CD , , 0 CD x SYM 03 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 01 CD , , 0 CD x SYM 08 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 66 CD , , 0 CD x SYM 69 CD , , 0 CD x SYM 66 CD , , 0 CD x SYM 69 CD , , 0 CD x SYM 00 CD , , username JJ fifi NP 0 CD x SYM 00 CD . SENT no DT password NN foreach NN out IN as IN o NN fputs NNS testcon NN , , chr NN o NN , , 1 CD . SENT in IN fread NN testcon NN , , 4096 CD . SENT echo NN server NN says VVZ . SENT in IN n NN . SENT logout NN command NN out IN array NN 0 CD x SYM 01 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 00 CD , , 0 CD x SYM 01 CD . SENT foreach NN out RB as IN o NN fputs NNS testcon NN , , chr NN o NN , , 1 CD . SENT fclose NN testcon NN . SENT . SENT rob VV at IN bronco NN dot VVP co NP dot VVP uk NP 19 CD Aug NN 2005 CD 03 CD . SENT 49 CD In IN a DT follow VVP up RP to TO Anthony NP Boyd NP , , if IN you PP have VHP the DT relevant JJ capability NN you PP can MD also RB start VV the DT MySQL NP server NN with IN the DT old JJ passwords NNS option NN , , or CC put VVD the DT line NN old JJ passwords NNS in IN to TO my PP$ . SENT cnf NN other JJ MySQL NP config NN file NN , , eg NN . SENT language NN usr NN share NN mysql NN english NP max NP connections NNS 1000 RB skip VVP external JJ locking VVG old JJ passwords NNS Instead RB of IN skip VV networking VVG the DT default NN is VBZ now RB to TO listen VV only RB on IN localhost NN which WDT is VBZ more RBR compatible JJ and CC is VBZ not RB less RBR secure JJ . SENT bind NN address NN 127 CD . SENT 0 CD . SENT 0 CD . SENT 1 CD bind NN address NN . SENT . SENT . SENT key JJ buffer NN 256 NP M NP I PP prefer VVP this DT option NN as IN it PP is VBZ more RBR transparent JJ to TO processes NNS creating VVG passwords NNS that IN you PP do VVP not RB control VV , , eg NN phpMyAdmin NN or CC in IN my PP$ case NN debian JJ maintenance NN scripts NNS . SENT Anthony NP Boyd NP 27 CD Jul NN 2005 CD 12 CD . SENT 53 CD Some RB versions NNS of IN PHP NP do VVP not RB support VV the DT new JJ longer JJR passwords NNS used VVN by IN MySQL NP 4 CD . SENT 1 CD and CC later JJR . SENT This DT will MD cause VV the DT error NN message NN that IN 2 CD raptor NN mentioned VVD a DT few JJ posts NNS prior RB to TO this DT one NN . SENT Client NN does VVZ not RB support VV authentication NN protocol NN requested VVN by IN server NN . SENT consider VV upgrading VVG MySQL NP client NN However RB , , for IN ease NN of IN use NN , , let's NNS review VVP the DT two CD fixes NNS right RB here RB . SENT First RB , , you PP should MD upgrade VV to TO a DT newer JJR PHP NP that WDT supports VVZ the DT longer JJR MySQL NP passwords NNS . SENT However RB , , I PP don't VVD even RB know VV if IN the DT PHP NP 4 CD . SENT x SYM series NN has VHZ been VBN upgraded VVN to TO handle VV this DT yet RB . SENT So RB for IN my PP$ installation NN , , I PP took VVD a DT different JJ approach NN I PP downgraded VVD MySQL's NP passwords NNS to TO the DT old JJ shorter JJR encryption NN . SENT Here's NP how WRB . SENT SET VVN PASSWORD NN FOR IN some DT user NN some DT host NN OLD JJ PASSWORD NN newpwd NN . SENT As IN a DT real JJ world NN example NN , , I PP used VVD this DT query NN . SENT SET VVN PASSWORD NN FOR IN testaccount JJ OLD JJ PASSWORD NN secret NN . SENT Suddenly RB , , PHP NP could MD use VV the DT testaccount NN to TO access VV the DT database NN . SENT Yay NP . SENT Tony JJ spam NN at IN modem NN help NN dot VVP com NN 17 CD Jul NN 2005 CD 01 CD . SENT 44 CD Centos NNS 4 CD , , php NN 4 CD , , mysql NP 4 CD . SENT 1 CD If IN mysql NN uses VVZ a DT Unix NP socket NN to TO connect VV , , and CC you PP move VVP the DT DB NP tables NNS from IN the DT default NN directory NN , , do VVP not RB also RB change VV the DT location NN or CC name NN of IN the DT mysql NN socket NN file NN within IN my PP$ . SENT cnf NN , , else RB your PP$ old JJ scripts NNS will MD not RB connect VV without IN modification NN . SENT The DT simplest JJS solution NN is VBZ to TO leave VV the DT socket NN file NN in IN it's JJ default NN location NN var NN lib NN mysql NN with IN Centos NNS Redhat NP . SENT Other JJ options NNS are VBP to TO set VV mysql NN . SENT default NN socket NN see VVP http NN . SENT www JJ . SENT php NN . SENT net JJ manual JJ en IN ref NN . SENT mysql NN . SENT php NN ini NNS . SENT mysql NN . SENT default NN socket NN , , or CC to TO set VV the DT new JJ path NN within IN the DT server NN option NN to TO mysql VV connect VV as RB above RB . SENT Extra JJ info NN . SENT Centos NNS 4 CD sets NNS skip VVP networking NN within IN my PP$ . SENT cnf NN by IN default NN , , which WDT causes VVZ all DT mysql NN connections NNS to TO be VB made VVN via IN Unix NP sockets NNS or CC named VVN pipes NNS on IN Windows NNS . SENT This DT both CC restricts VVZ all DT connections NNS to TO the DT localhost NN a DT security NN enhancement NN and CC is VBZ faster JJR . SENT The DT problem NN is VBZ that IN , , although IN mysql NN . SENT default NN socket NN is VBZ NULL JJ by IN default NN , , the DT Unix NP socket NN name NN location NN is VBZ both DT hard RB coded VVN into IN the DT Centos NNS Redhat NP php NN mysql NN RPM NP libraries NNS and CC PHP NP will MD ignore VV any DT my PP$ . SENT cnf NN socket NN settings NNS that WDT differ VVP from IN the DT defaults NNS . SENT Brought VVN to TO you PP from IN the DT School NP of IN Hard NP Knocks VVZ . SENT bacchus NP 15 CD Jul NN 2005 CD 06 CD . SENT 17 CD If IN you're NN using VVG PHP NP 5 CD on IN Debian NP currently RB only RB available JJ from IN dotdeb NN . SENT org NP and CC you PP get VVP errors NNS connecting VVG to TO MySQL NP despite IN phpinfo NN reporting NN that IN PHP NP was VBD compiled VVN with IN MySQL NP support NN , , install VV the DT php JJ 5 CD mysql NN package NN . SENT 25 CD Jun NN 2005 CD 12 CD . SENT 18 JJ connect VVP to TO mysql VV via IN named VVN pipe NN under IN windows NNS . SENT in IN my PP$ . SENT ini NP , , add VVP this DT . SENT mysqld NNS enable VVP named VVN pipe NN then RB connect VVP to TO the DT server NN , , then RB connect VVP to TO mysql VV using VVG mysql NN connect VVP . SENT cwenner NN at IN gmail NN dot VVP com NN 21 CD Jun NN 2005 CD 06 CD . SENT 15 RB The DT previous JJ post NN regarding VVG the DT reg NP exps NNS featuring VVG Files NP . SENT inc NP . SENT php NN . SENT should MD of IN course NN be VB Files NP . SENT inc NP . SENT php NN . SENT Though RB with IN a DT hardly RB noticeable JJ difference NN . SENT Note NN that IN this DT as RB well RB as IN the DT previous JJ takes VVZ both DT extensions NNS of IN . SENT inc NP as IN inc NP . SENT php NN into IN account NN . SENT Anyone NN interested VVN in IN learning VVG more JJR regarding VVG regular JJ expressions NNS may MD find VV such JJ at IN the DT following VVG page NN . SENT http NN . SENT www JJ . SENT php NN . SENT net JJ manual JJ en IN ref NN . SENT pcre NN . SENT php NN As IN well RB as RB in IN the DT many JJ resources NNS that WDT may MD be VB found VVN on IN the DT net NN and CC books NNS now RB adays NNS . SENT On IN a DT side NN note NN , , one PP may MD fuse VV the DT Files NP . SENT inc NP . SENT php NN . SENT and CC Files NP . SENT ht NNS into IN Files NP . SENT ht NNS . SENT inc NP . SENT php NN . SENT to TO account VV for IN the DT two CD at IN once RB . SENT arekm NN at IN pld NN linux NNS dot VVP org NP 13 CD Mar NP 2005 CD 03 CD . SENT 29 CD Setting NP default NN character NN set VVN when WRB connecting VVG to TO mysql NP 4 CD . SENT 1 CD server NN can MD be VB done VVN by IN issuing VVG for IN example NN . SENT SET NN NAMES NNS latin JJ 2 CD command NN after IN each DT connection NN which WDT isn't VVD so RB nice JJ because IN it PP needs VVZ to TO change VV every DT app NP . SENT There EX is VBZ nicer JJR solution NN that WDT can MD be VB used VVN on IN server NN side NN simply RB put VVD in IN mysqld NN section NN of IN mysqld NN . SENT conf NN . SENT init NNS connect VVP SET VVN NAMES NNS latin NP 2 CD This DT will NN cause NN , , , , set NN names NNS command VVP to TO be VB issued VVN on IN every DT connection NN no RB need VVP to TO change VV php NN apps NNS . SENT codeslinger JJR at IN compsalot NN dot VVP com NN 18 CD Feb NN 2005 CD 04 CD . SENT 15 RB There EX are VBP two CD ways NNS to TO connect VV to TO the DT local JJ server NN . SENT 1 CD If IN you PP want VVP to TO specify VV a DT Port NP you PP MUST MD use VV 127 CD . SENT 0 CD . SENT 0 CD . SENT 1 CD for IN the DT Host NN name NN . SENT When WRB you PP specify VV localhost NN the DT Port NP number NN is VBZ ignored VVN and CC the DT default NN socket NN is VBZ used VVN instead RB . SENT Example NN . SENT Host NN 127 CD . SENT 0 CD . SENT 0 CD . SENT 1 LS . SENT 4321 CD . SENT 2 CD If IN you PP want VVP to TO specify VV a DT socket NN path NN , , the DT host NN name NN is VBZ optional JJ , , but CC if IN used VVN , , it PP MUST MD be VB localhost JJ . SENT Example NN . SENT Host NN localhost NN . SENT path NN to TO socket NN . SENT or CC Host NP . SENT path NN to TO socket NN . SENT Note NN . SENT That IN giving VVG the DT specified JJ user NN permission NN to TO login NN from IN localhost NN is VBZ NOT RB the DT same JJ as IN giving VVG them PP permission NN to TO login NN from IN 127 CD . SENT 0 CD . SENT 0 CD . SENT 1 CD and CC vice NN versa FW . SENT If IN you PP want VVP to TO be VB able JJ to TO login NN from IN both CC then RB you PP must MD create VV two CD entries NNS , , one CD for IN each DT host NN name NN , , in IN the DT mysql NN . SENT user NN table NN . SENT It PP is VBZ a DT really RB bad JJ idea NN to TO allow VV logins NP from IN any DT computer NN by IN specifying VVG the DT host NN wild JJ card NN . SENT And CC elsewhere RB on IN this DT page NN is VBZ some DT horrible JJ advice NN to TO specify VV a DT blank JJ password NN . SENT . SENT . SENT Don't NP Do VVP It PP unless IN you PP want VVP your PP$ server NN cracked VVD in IN about IN 5 CD minutes NNS flat JJ . SENT Using VVG old JJ password NN as RB described VVD below IN , , works VVZ just RB fine JJ for IN php NN compatibility NN . SENT Remeber NP after IN adding VVG or CC changing VVG user NN permissions NNS you PP MUST MD do VV a DT FLUSH JJ PRIVILEGES NNS . SENT the DT change NN that IN you PP made VVD does VVZ not RB take VV effect NN until IN you PP do VVP . SENT . SENT . SENT Guess VV how WRB I PP know VVP this DT . SENT k NN DOT NP gornik NP AT IN xds NP DOT NP pl NP 10 CD Feb NN 2005 CD 03 CD . SENT 10 CD Surely RB made VVN mistake NN below RB . SENT should MD be VB . SENT php NN if IN version NN compare VVP mysql NP ver NP , , 4 CD . SENT 1 LS . SENT 0 CD , , 0 CD . SENT not RB . SENT php NN if IN version NN compare VVP mysql NP ver NP , , 4 CD . SENT 2 LS . SENT 0 CD , , 0 CD . SENT Sorry JJ . SENT k NN dot VVP gornik NN at IN xds NNS dot VVP pl NP 10 CD Feb NN 2005 CD 03 CD . SENT 06 CD To TO avoid VV something NN like IN this DT . SENT Database NN error NN . SENT Invalid JJ SQL NP . SENT SELECT VV FROM IN alias NN WHERE WRB path NN 1108043672 CD AND CC fk NN client NN id NN 2 CD MySQL NP Error NN . SENT 1267 CD Illegal JJ mix NN of IN collations NNS latin JJ 2 CD general JJ ci NNS , , IMPLICIT JJ and CC latin JJ 1 CD swedish JJ ci NNS , , COERCIBLE JJ for IN operation NN Session NP halted VVD . SENT PHP NP 4 CD . SENT 3 LS . SENT 10 CD MySQL NP 4 CD . SENT 1 LS . SENT 0 CD simply RB write VV . SENT . SENT php NN class NN MySQL NP . SENT . SENT . SENT function NN connect VVP host NN , , user NN , , pass VV this DT Link NN DB NP mysql NN connect VVP host NN , , user NN , , pass VV . SENT if IN this DT Link NN DB NP if IN version NN compare VVP phpversion NN , , 4 LS . SENT 3 LS . SENT 10 CD , , 0 CD result NN mysql NN query NN SHOW NN VARIABLES NNS LIKE IN version NN , , this DT Link NN ID NN . SENT row NN mysql NN fetch VV row NN result NN . SENT mysql NP ver NP row NN 1 CD . SENT if IN version NN compare VVP mysql NP ver NP , , 4 CD . SENT 2 LS . SENT 0 CD , , 0 CD i NP 1 CD . SENT while IN defined VVN DB NP INIT NP CODE NN . SENT i NP sQuery NP constant JJ DB NP INIT NP CODE NN . SENT i NP . SENT mysql NN query NN sQuery NN , , this DT Link NN ID NN . SENT i NP . SENT else RB return VV false JJ . SENT return NN true JJ . SENT . SENT and NP . SENT php NN define VV DB NP INIT NP CODE NN 1 CD , , SET VVN NAMES NNS latin JJ 2 CD . SENT define VV DB NP INIT NP CODE NN 2 CD , , SET VVN CHARACTER NN SET VVN latin NP 2 CD . SENT define VV DB NP INIT NP CODE NN 3 CD , , SET VVN COLLATION NN CONNECTION NN latin NP 2 CD general JJ ci NNS . SENT and CC so RB on IN . SENT . SENT . SENT . SENT elsewhere RB like IN I PP put VVP it PP down RP in IN MySQL NP . SENT config NN . SENT inc NP . SENT php NN The DT only JJ important JJ thing NN is VBZ You PP MUST MD include VV definitions NNS before IN including VVG object NN MySQL NN . SENT Spent VVN lot NN of IN time NN looking VVG for IN prettier JJR solution NN but CC there RB seems VVZ not RB to TO be VB any RB . SENT . SENT . SENT omikorn NN at IN yahoo NN dot VVP com NN 05 CD Dec NP 2004 CD 12 CD . SENT 21 CD maybe RB you PP have VHP seen VVN this DT using VVG PHP NP 4 CD . SENT 3 LS . SENT 9 CD and CC MySQL NP client NN server NN 4 CD . SENT 1 CD Error NN w NN php NN . SENT mysql NNS connect VVP . SENT Client NN does VVZ not RB support VV authentication NN protocol NN Solution NN . SENT mysql NN u NN root NN p NN SET VVD PASSWORD NN FOR IN user NN localhost NN OLD JJ PASSWORD NN password NN . SENT It PP is VBZ clearly RB that IN this DT is VBZ a DT bug NN in IN PHP's NP mysql NN module NN , , perhaps RB it PP will MD be VB upgraded VVN in IN the DT next JJ version NN Resource NP . SENT http NN . SENT forums NNS . SENT mysql NN . SENT com NN read VVD . SENT php NN . SENT 11 CD , , 6400 CD , , 6701 CD msg NP 6701 CD camitz NN at IN NOSPAM NP dot VVP example NN dot VVP com NN 27 CD Oct NP 2004 CD 10 CD . SENT 05 CD A DT description NN about IN the DT problem NN with IN the DT password NN hashing VVG and CC how WRB to TO adress VV them PP can MD be VB found VVN at IN http NN . SENT dev NP . SENT mysql NN . SENT com NN doc NN mysql NN en IN Password NN hashing VVG . SENT html NN chaoscontrol NN hq NP at IN yahoo NN dot VVP com NN 23 CD Aug NN 2004 CD 11 CD . SENT 10 CD In IN MySQL NP 4 CD . SENT 1 CD and CC later RBR , , the DT default NN password NN hashing VVG format NN has VHZ changed VVN making VVG it PP incompatible JJ with IN 3 CD . SENT x SYM clients NNS . SENT I PP found VVD out RP mysql NN connect VVP works NNS on IN server NN versions NNS 4 CD . SENT 1 CD when WRB your PP$ MySQL NP user NN password NN is VBZ blank JJ because IN password NN authentication NN isn't NN done VVN in IN that DT case NN , , otherwise RB you PP need VVP to TO use VV another DT connection NN method NN e NN . SENT g NN . SENT mysqli NNS . SENT Also RB if IN you PP are VBP using VVG old JJ MySQL NP tables NNS on IN a DT new JJ server NN i NP . SENT e SYM . SENT the DT passwords NNS are VBP stored VVN in IN the DT old JJ format NN , , then RB the DT server NN will MD use VV the DT old JJ auth NP method NN automatically RB and CC this DT function NN should MD work VV in IN all DT cases NNS . SENT Hopefully RB this DT will MD help VV someone NN , , it PP had VHD me PP confused VVN for IN a DT while NN because IN some DT of IN the DT users NNS on IN my PP$ 4 CD . SENT 1 CD server NN could MD connect VV and CC some DT couldn't NN . SENT martinnitram JJR at IN excite VV dot VVP com NN 31 CD Oct NP 2003 CD 11 CD . SENT 22 CD to TO use VV load NN data NNS local JJ infile NN function NN from IN mysql NN at IN mysql NP 4 CD . SENT 0 CD . SENT 16 CD , , php NP 4 CD . SENT 3 LS . SENT 3 LS , , set VV fifth JJ parameter NN of IN mysql NN connect VVP to TO CLIENT NN LOCAL JJ FILES NNS 128 CD , , which WDT based VVN on IN MYSQL NP C NP API NP also RB mysql NN server NN support NN load NN file NN , , check NN by IN show NN variables NNS like IN local JJ infile NN Thank VV phpweb NN at IN eden NP 2 CD dot VVP com NN to TO point VV this DT out IN AlbieNoSp NP 4 CD m NN at IN hotmail NN dot VVP com NN 13 CD Jul NN 2003 CD 03 CD . SENT 49 CD Just RB a DT small JJ follow VV up RP , , but CC a DT small JJ error NN in IN someones NNS post NN , , regarding VVG security NN of IN . SENT inc NP files VVZ . SENT the DT . SENT inc NP is VBZ actually RB a DT regular JJ expression NN , , this DT expresion NN would MD match VV anything NN with IN inc NP in IN it PP , , ex FW . SENT wince NN . SENT php NN , , prince NN . SENT html NN , , etc FW . SENT The DT correct JJ expression NN would MD be VB . SENT Files NNS . SENT inc NP . SENT php NN . SENT Order NN allow VVP , , deny VVP Deny NP from IN all DT Satisfy VV All DT Files NP This NP makes VVZ it PP so RB , , all PDT your PP$ . SENT inc NP or CC . SENT inc NP . SENT php NN files NNS are VBP not RB readable JJ . SENT QUOTE NN . SENT So RB , , just RB add VV the DT following VVG chunk NN of IN text NN to TO your PP$ httpd NN . SENT conf NN file NN . SENT Files NNS . SENT inc NP Order NP allow VVP , , deny VVP Deny NP from IN all DT Satisfy VV All DT Files NP Andy NP Calderbank NP phpweb NP at IN eden NP 2 CD dot VVP com NN 28 CD Jun NN 2003 CD 08 CD . SENT 55 CD client NN flags NNS can MD be VB things NNS other JJ than IN MYSQL NP CLIENT NN COMPRESS NN , , MYSQL NP CLIENT NN IGNORE VVP SPACE NN and CC MYSQL NN CLIENT NN INTERACTIVE JJ . SENT I PP presume VV that DT mysql NN connect VVP just RB passes VVZ through RP to TO the DT C NP MySQL NP API NP , , which WDT provides VVZ these DT constants NNS . SENT define VV CLIENT NN LONG JJ PASSWORD NN 1 CD new JJ more JJR secure JJ passwords NNS define VV CLIENT NN FOUND VVD ROWS NNS 2 CD Found VVN instead RB of IN affected JJ rows NNS define VV CLIENT NN LONG JJ FLAG NN 4 CD Get VVP all DT column NN flags NNS define VV CLIENT NN CONNECT VVP WITH IN DB NP 8 CD One CD can MD specify VV db NP on RB connect VVP define VV CLIENT NN NO DT SCHEMA NN 16 CD Don't NP allow VV database NN . SENT table NN . SENT column NN define VV CLIENT NN COMPRESS NN 32 CD Can MD use VV compression NN protocol NN define VV CLIENT NN ODBC NP 64 CD Odbc NP client NN define VV CLIENT NN LOCAL JJ FILES NNS 128 CD Can MD use VV LOAD NN DATA NNS LOCAL JJ define VV CLIENT NN IGNORE VV SPACE NN 256 RB Ignore VV spaces NNS before RB define VV CLIENT NN CHANGE NN USER NP 512 CD Support NN the DT mysql NN change NN user NN define VV CLIENT NN INTERACTIVE JJ 1024 CD This NP is VBZ an DT interactive JJ client NN define VV CLIENT NN SSL NP 2048 CD Switch NN to TO SSL NP after IN handshake NN define VV CLIENT NN IGNORE VV SIGPIPE NP 4096 CD IGNORE VVP sigpipes NNS define VV CLIENT NN TRANSACTIONS NNS 8192 CD Client NP knows VVZ about IN transactions NNS Not RB all RB of IN these DT may MD work VV or CC be VB meaningful JJ , , but CC CLIENT NN FOUND VVD ROWS NNS does VVZ , , at IN least JJS . SENT Graham NP Rule NP at IN ed NP dot VVP ac NNS dot VVP uk NP 14 CD May NP 2003 CD 05 CD . SENT 43 CD Another DT solution NN to TO the DT security NN problems NNS of IN putting VVG usernames NNS and CC passwords NNS into IN scripts NNS . SENT I NP haven't NP found VVD this DT documented VVN anywhere RB else RB so RB thought VVD I'd NP suggest VVP it PP for IN the DT online JJ documentation NN . SENT . SENT . SENT . SENT . SENT . SENT . SENT . SENT . SENT Don't NP put VVD passwords NNS for IN mysql NN into IN scripts NNS which WDT may MD be VB read VVN by IN any DT user NN on IN the DT machine NN . SENT Instead RB put VV them PP into IN an DT Apache NP configuration NN file NN and CC make VV sure JJ that IN it PP is VBZ not RB world NN readable JJ . SENT Apache NP reads VVZ its PP$ main JJ config NN files NNS as IN root NN . SENT For IN example NN , , add VVP this DT to TO your PP$ httpd NN . SENT conf NN and CC chmod VV it PP to TO 600 CD or CC 660 CD then RB tell VV your PP$ apache NN to TO reload VV itself PP apachectl NN graceful JJ . SENT Directory NN var NN www JJ html NN mydatabase NN php NN value NN mysql NN . SENT default NN user NN fred NP php NN value NN mysql NN . SENT default NN password NN secret JJ php NN value NN mysql NN . SENT default NN host NN server NN . SENT example NN . SENT com NN Directory NN Then RB all RB you PP need VVP in IN your PP$ PHP NP code NN is VBZ handle VV mysql NN connect VV or CC die VV mysql NN error NN . SENT The DT passwords NNS etc NN will MD only RB be VB picked VVN up RP by IN scripts NNS running VVG in IN the DT named VVN directory NN or CC a DT sub NN directory NN . SENT The DT same JJ may MD be VB done VVN for IN virtualhosts NNS etc NN . SENT If IN you PP don't VVD want VV to TO keep VV reloading VVG your PP$ Apache NP server NN then RB you PP ay RB test VVP things NNS putting VVG the DT php NN value NN directives NNS into IN a DT world NN readable JJ . SENT htaccess NN file NN . SENT Clearly RB not RB for IN production NN use NN . SENT If IN you PP need VVP to TO debug VV the DT values NNS that WDT are VBP being VBG supplied VVN or CC not RB then RB use VV this DT snippet NN . SENT syslog NNS LOG VVP DEBUG VV , , Using VVG user NN . SENT ini NNS get VVP mysql NN . SENT default NN user NN . SENT pass VV . SENT ini NNS get VVP mysql NN . SENT default NN password NN . SENT host NN . SENT ini NNS get VVP mysql NN . SENT default NN host NN . SENT This DT assumes VVZ that IN you PP are VBP not RB running VVG in IN safe JJ mode NN and CC that IN you PP are VBP on IN a DT unix NP of IN some DT sort NN . SENT amn NNS at IN frognet NN . SENT net NN 12 CD Mar NP 2003 CD 07 CD . SENT 40 CD Just RB in IN case NN you PP didn't VVD know VV . SENT You PP can MD use VV mysql NN connect VVP in IN a DT function NN to TO connect VV to TO a DT database NN and CC the DT connection NN is VBZ a DT super JJ global JJ . SENT . SENT . SENT meaning VVG you PP can MD use VV mysql NN query NN in IN other JJ functions NNS or CC in IN no DT function NN at IN all DT and CC PHP NP will MD use VV the DT connection NN that IN you PP opened VVD . SENT This DT is VBZ a DT handy JJ bit NN of IN knowledge NN that WDT helps VVZ if IN you PP have VHP a DT large JJ site NN with IN lots NNS of IN scripts NNS . SENT If IN you PP create VVP one PP function VVP to TO connect VV to TO a DT db NP , , and CC call VV that DT function NN in IN all PDT your PP$ scripts NNS , , it PP makes VVZ for IN easier JJR code NN maintenance NN since IN you PP only RB have VHP to TO update VV one CD line NN of IN code NN to TO change VV your PP$ mysql NN connection NN instead RB of IN updating VVG all PDT your PP$ scripts NNS individually RB . SENT rec NN 0 CD rder NN at IN lycos NNS dot VVP com NN 09 CD Apr NN 2002 CD 08 CD . SENT 54 CD The DT method NN I PP use VVP to TO protect VV mySQL NN connect VVP is VBZ to TO place VV dbConnect NN . SENT php NN outside IN the DT web NN directory NN . SENT I PP will MD create VV a DT directory NN . SENT var NN include VVP Put VV dbConnect NN . SENT php NN into IN var NN include VVP Edit VV your PP$ php NN . SENT ini NNS file VVP to TO read VV var NN include VVP an DT include VVP directory NN . SENT In IN your PP$ PHP NP now RB , , you PP just RB have VHP to TO do VV . SENT require VV dbConnect NN . SENT php NN . SENT nospam NN at IN code NN 24 CD dot VVP com NN 27 CD Mar NP 2002 CD 12 CD . SENT 37 CD There RB should MD already RB be VB a DT post NN in IN here RB about IN this DT , , but CC I PP would MD like VV to TO follow VV up RP on IN the DT idea NN that IN anyone NN can MD read VV your PP$ . SENT inc NP files NNS , , which WDT might MD contain VV username JJ password NN combos NNS for IN mysql NN access NN . SENT There EX is VBZ a DT very RB simple JJ way NN to TO block VV this DT . SENT If IN you PP are VBP using VVG Apache NP , , just RB edit VV your PP$ httpd NN . SENT conf NN file NN , , and CC look VVP for IN the DT following VVG lines NNS . SENT Files NNS . SENT ht NN Order NN allow VVP , , deny VVP Deny NP from IN all DT Satisfy VV All DT Files NP Okay NP . SENT . SENT . SENT that DT little JJ chunk NN of IN text NN is VBZ saying VVG that IN you PP don't VVD want VV files NNS that WDT begin VVP with IN . SENT ht VVG to TO be VB readable JJ through IN apache NN . SENT We PP also RB don't JJ want VVP people NNS to TO see VV any DT files NNS that WDT end VVP with IN . SENT inc NP . SENT So RB , , just RB add VV the DT following VVG chunk NN of IN text NN to TO your PP$ httpd NN . SENT conf NN file NN . SENT Files NNS . SENT inc NP Order NP allow VVP , , deny VVP Deny NP from IN all DT Satisfy VV All DT Files NP This NP will MD block VV anyone NN from IN seeing VVG your PP$ . SENT inc NP files VVZ over IN the DT web NN . SENT It PP is VBZ much RB smarter RBR than IN naming VVG include VVP files VVZ , , . SENT php NN . SENT Use VV the DT . SENT php NN extension NN for IN your PP$ code NN , , and CC save VV . SENT inc NP for IN actual JJ include VVP data NNS , , and CC don't JJ worry NN about IN people NNS reading VVG your PP$ . SENT inc's NNS anymore RB . SENT Hope VV this DT helps VVZ somebody NN . SENT Oh UH yeah RB . SENT . SENT . SENT one CD other JJ thing NN . SENT . SENT . SENT obviously RB , , anytime RB you PP make VVP a DT change NN to TO httpd NN . SENT conf NN or CC whatever WDT you PP have VHP named VVN your PP$ Apache NP config NN file NN , , you PP must MD restart VV apache NN for IN the DT changes NNS to TO take VV effect NN . SENT add VV a DT note NN mysql NN closemysql NN create VV db NP Last JJ updated VVN . SENT Sat VVN , , 29 CD Oct NP 2005 CD show NN source NN credits NNS sitemap NN contact NN advertising NN mirror NN sites NNS Copyright NN 2001 CD 2005 CD The DT PHP NP GroupAll NP rights NNS reserved VVD . SENT This DT mirror NN generously RB provided VVD by IN . SENT Speedbone NP Last JJ updated VVN . SENT Wed VVN Nov NP 16 CD 23 CD . SENT 18 CD . SENT 20 CD 2005 CD CET NP