Posted on September 27, 2009 by ergut
All of a sudden I started to get the following error:
#1045 - Access denied for user 'root'@'localhost' (using password: NO)
whenever I tried to access to mysql database through phpmyadmin. I have been using it flawless for very long time.
I modified the following file:
/var/lib/phpmyadmin/config.inc.php
by changing
$cfg['Servers'][$i]['auth_type'] = 'config';
to
$cfg['Servers'][$i]['auth_type'] = 'cookie';
and everything is working fine now.
Filed under: mysql, php | Tagged: mysql, phpmyadmin | Leave a comment »
Posted on January 26, 2009 by ergut
Return a reference to column names
$name = $sth->{NAME};
Number of affected rows
$sth->rows();
New auto-incremented id
$latestId = $dbh->{‘mysql_insertid’}
Uploading large data. ‘INSERT INTO’ command takes long amount of time. Use ‘LOAD DATA’ command to upload bulk data from a text file.
- Be careful. If the file to be uploaded resides on the server, it still needs to be accessible by the mysql server. E.g. you can place them under /tmp
- You can specify NULL characters by ‘\N’, e.g. “9,\N,276,John…”
Filed under: computer, mysql, Perl | Leave a comment »