Re: Funky permission issue...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 20 August 2014 20:14:53 BST, Don Wieland <donw@xxxxxxxxxxxxxxxxxx> wrote:
>Got another fun one:
>
>Trying to run this code/query from a php page:
>
>mysql_connect('localhost', 'dwdc_pps', 'hidden') or die(mysql_error());
>mysql_select_db('dwdc_pps') or die(mysql_error());
>
>$q = "SELECT * INTO OUTFILE \"/Macintosh
>HD/Users/donwieland/Desktop/data_test.csv\"
>FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\"'
>LINES TERMINATED BY \"\n\"
>FROM snomed_db";
>
>echo $q;
>
>$result=mysql_query($q) OR die("Error:".mysql_error());
>
>Generating an error: Error:Access denied for user
>'dwdc_pps'@'localhost' (using password: YES)
>
>Basically I am trying dump a tables contents LOCALLY on my MAC. This
>PHP is in a sub-domain of where the mysql database was created.
>
>Any ideas on what my problem is and how to remedy it?
>
>Don Wieland
>D W   D a t a   C o n c e p t s
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


First, try not to use the mysql_* functions, use mysqli_* or something like PDO instead, they're more secure.

Your problem here though looks like you have either the username or password wrong for your MySQL account. Are you able to connect via a different program, like phpMyAdmin, or sqlYog with those credentials? 
Thanks,
Ash

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux