I downloaded the Sphider search engine and I am currently trying to run it via my localhost. I extracted it in my root folder and made a search bar in HTML:
<div id="searchwrapper">
<form action="../sphider-1.3.5/search.php" method="get" title="eurobytes search">
<input type="text" class="searchbox" name="s" value="" action="../sphider-1.3.5/include/js_suggest/suggest.php" columns="2" autocomplete="off" delay="1500" bgcolor="transparent"/>
<input type="hidden" name="search" value="1">
<input type="image" src="../images/search.png" height="15" class="searchbox_submit" value="search" />
</form>
</div>
but when I type something in I get this error:
Cannot connect to database, check if username, password and host are correct.
I am pretty new to MySQL I read the install.txt
, in the sphider-1.3.5 folder, and did the following:
mysql -u your username -p Enter your password when prompted. b) in MySQL, type: CREATE DATABASE sphider_db;
But, when I type in CREATE DATABASE sphider_db
I get this:
I don't know what to type now. I tried sphider_db
exit
but nothing happens?
Sorry if this problem is common sense to most, but I just started playing with MySQL/Sphider.
Have you edited settings/database.php? Sounds like a configuration issue... Here are 2 steps to start troubleshooting:
Here is the code snippet from database.php you need to edit with your db settings and user credentials (v1.3.5)
/***********************
Database 1 settings
***********************/
// Name of database
$database1 = "test";
// MySQL User
$mysql_user1 = "test-user";
// MySQL Password
$mysql_password1 = "test-user-pw";
// MySQL Host
$mysql_host1 = "localhost";
// Prefix for tables
$mysql_table_prefix1 = "test_";
// Status of database
$db1_set = "1";