Can't connect with MySQL DB in CLI mode (Being connected in GUI Mode) in PHP -


i'm trying connect mysql in command line php script file. have file i'm running in gui mode, in command line mode giving me below error @ time of mysqli_connect:

mysqlnd cannot connect mysql 4.1+ using old insecure authentication. please use administration tool reset password command set password = password('your_existing_password'). store new, , more secure, hash value in mysql.user. if user used in other scripts executed php 5.2 or earlier might need remove old-passwords flag my.cnf file

i understand can update password. due reason, can't update old password new passwords. need connect mysql support of old password.

again, mentioning same code working fine in gui mode not in cli mode on same server. how happening. has idea?

can check php.ini files used web server , command line php? web server, create page phpinfo() , check location of php.ini file. once php.ini file location used web server, can execute php script command line using

php -c <path of php.ini> <your php script> 

Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -