http://digitalpbk.com/apachesolr/apache-solr-mysql-sample-data-config
.
Download the
JDBC Driver
Download the
JDBC Driver for
MySQL from http://
mysql.spd.co.il/Downloads/Connector-J/mysql-connector-java-3.1.14.zip
Put the
"mysql-connector-java-3.1.14-bin.jar" in
Solr Dir/example/lib
Configuring
Solr to Use
MySQL
Solr can be configured to connect to a
MySQL Data base using the DataImportHandler. To do so first in solrconfig.xml (This file would be in
Solr Dir/example/conf) add a new requestHandler which is handled by DIH (DataImportHandler).
data ...
Published 1 year, 11 months ago
http://digitalpbk.com/mysql/select-random-rows-table
Select random rows from a table in
MySQL
In order to select a random row from
MySQL, we can order the rows by a random number and then pick the first row.
SELECT * FROM node ORDER BY rand() limit 1;
The above query randomly selects a row from the table node.
MySQL
Software ...
Published 1 year, 9 months ago
http://digitalpbk.com/perl/solve-netmysql-hang-problem-if-database-result-has-only-1-row-or-empty
Resolve Net::MySQL Hang problem if the database result has only 1 row or is empty
Net::MySQL is a simple
MySQL perl Client to connect to
MySQL servers. But Net::MySQL hangs if your result set is having just one row.
Sample Net::MySQL code
#!/usr/bin/perl
use Net::MySQL;
$
mysql = Net::MySQL->new(
hostname => 'localhost',
database => 'db',
user => 'user',
password => 'password',
);
$gid = 1;
$mysql->query('SELECT * FROM table ...
Published 1 year, 10 months ago
http://digitalpbk.com/drupal/how-change-drupal-root-user-password
How to change root admin user password in Drupal ?
In order to reset the root or superadmin password on a drupal system, login into the database by looking at the settings.php. You can use phpMyAdmin or any other
MySQL utilities like SQLYog, or
MySQL command line.
Run the following query to reset the password.
UPDATE users SET pass = MD5('password') WHERE uid = 1
The user id of administrator is always 1.
Password field in drupal is stored as MD5 of the actual string password. So ...
Published 1 year, 10 months ago
http://digitalpbk.blogspot.com/2009/06/hacking-sql-injection-tutorial.html
. Warning: The following methods may be illegal, given for illustration purpose only. Most dynamic websites use a database server such as SQL Server from Microsoft,
MySQL, etc. To demonstrate what SQL injection is, let us see a piece of code that is used as a login script. Most ASP websites use a code like this:user = Request.Form("user")pass = Request.Form("pass")SQL = "SELECT * FROM users WHERE username='" & user & _ "' AND password='" ...
Published 2 years, 7 months ago