Commit d752d355 authored by Johnny Kalajdzic's avatar Johnny Kalajdzic

Add MySql configuration in README.rst

parent ec919198
......@@ -14,6 +14,51 @@ See the `documentation <https://asciimoo.github.io/searx>`__ and the `wiki <http
|OpenCollective searx backers|
|OpenCollective searx sponsors|
Setup MySql
~~~~~~~~~~~
**Install MySql**
``$ sudo apt-get install mysql-server``
**Start MySql**
``$ sudo service mysql start
$ mysql -u root -p``
**Create a new database and give all rights to a new searx user**
change password!
``mysql> create database searx_history;
mysql> create user "searx"@"localhost" identified by "password";
mysql> grant all on searx_history.* to "searx"@"localhost" identified by "password";``
**You can now quit the MySql console by typing ``quit`` and connect as searx user**
``$ mysql -u searx -p``
**Here are some commands to init the database**
``mysql> use chess_history``
``mysql> create table FILES(QUERY VARCHAR(256), PAGENO INT(11), PAGING BOOLEAN, SAFE_SEARCH INT(11), LANGUAGE VARCHAR(256), TIME_RANGE VARCHAR(256), ENGINES VARCHAR(256), RESULTS VARCHAR(256), RESULTS_NUMBER INT(11), RESULTS_LENGTH INT(11), ANSWERS VARCHAR(256), CORRECTIONS VARCHAR(256), INFOBOXES VARCHAR(256), SUGGESTIONS VARCHAR(256), UNRESPONSIVE_ENGINES VARCHAR(256));``
``mysql> create table GENERAL(QUERY VARCHAR(256), PAGENO INT(11), PAGING BOOLEAN, SAFE_SEARCH INT(11), LANGUAGE VARCHAR(256), TIME_RANGE VARCHAR(256), ENGINES VARCHAR(256), RESULTS VARCHAR(256), RESULTS_NUMBER INT(11), RESULTS_LENGTH INT(11), ANSWERS VARCHAR(256), CORRECTIONS VARCHAR(256), INFOBOXES VARCHAR(256), SUGGESTIONS VARCHAR(256), UNRESPONSIVE_ENGINES VARCHAR(256));``
``mysql> create table IMAGES(QUERY VARCHAR(256), PAGENO INT(11), PAGING BOOLEAN, SAFE_SEARCH INT(11), LANGUAGE VARCHAR(256), TIME_RANGE VARCHAR(256), ENGINES VARCHAR(256), RESULTS VARCHAR(256), RESULTS_NUMBER INT(11), RESULTS_LENGTH INT(11), ANSWERS VARCHAR(256), CORRECTIONS VARCHAR(256), INFOBOXES VARCHAR(256), SUGGESTIONS VARCHAR(256), UNRESPONSIVE_ENGINES VARCHAR(256));``
``mysql> create table IT(QUERY VARCHAR(256), PAGENO INT(11), PAGING BOOLEAN, SAFE_SEARCH INT(11), LANGUAGE VARCHAR(256), TIME_RANGE VARCHAR(256), ENGINES VARCHAR(256), RESULTS VARCHAR(256), RESULTS_NUMBER INT(11), RESULTS_LENGTH INT(11), ANSWERS VARCHAR(256), CORRECTIONS VARCHAR(256), INFOBOXES VARCHAR(256), SUGGESTIONS VARCHAR(256), UNRESPONSIVE_ENGINES VARCHAR(256));``
``mysql> create table MUSIC(QUERY VARCHAR(256), PAGENO INT(11), PAGING BOOLEAN, SAFE_SEARCH INT(11), LANGUAGE VARCHAR(256), TIME_RANGE VARCHAR(256), ENGINES VARCHAR(256), RESULTS VARCHAR(256), RESULTS_NUMBER INT(11), RESULTS_LENGTH INT(11), ANSWERS VARCHAR(256), CORRECTIONS VARCHAR(256), INFOBOXES VARCHAR(256), SUGGESTIONS VARCHAR(256), UNRESPONSIVE_ENGINES VARCHAR(256));``
``mysql> create table NEWS(QUERY VARCHAR(256), PAGENO INT(11), PAGING BOOLEAN, SAFE_SEARCH INT(11), LANGUAGE VARCHAR(256), TIME_RANGE VARCHAR(256), ENGINES VARCHAR(256), RESULTS VARCHAR(256), RESULTS_NUMBER INT(11), RESULTS_LENGTH INT(11), ANSWERS VARCHAR(256), CORRECTIONS VARCHAR(256), INFOBOXES VARCHAR(256), SUGGESTIONS VARCHAR(256), UNRESPONSIVE_ENGINES VARCHAR(256));``
``mysql> create table SCIENCE(QUERY VARCHAR(256), PAGENO INT(11), PAGING BOOLEAN, SAFE_SEARCH INT(11), LANGUAGE VARCHAR(256), TIME_RANGE VARCHAR(256), ENGINES VARCHAR(256), RESULTS VARCHAR(256), RESULTS_NUMBER INT(11), RESULTS_LENGTH INT(11), ANSWERS VARCHAR(256), CORRECTIONS VARCHAR(256), INFOBOXES VARCHAR(256), SUGGESTIONS VARCHAR(256), UNRESPONSIVE_ENGINES VARCHAR(256));``
``mysql> create table SOCIAL_MEDIA(QUERY VARCHAR(256), PAGENO INT(11), PAGING BOOLEAN, SAFE_SEARCH INT(11), LANGUAGE VARCHAR(256), TIME_RANGE VARCHAR(256), ENGINES VARCHAR(256), RESULTS VARCHAR(256), RESULTS_NUMBER INT(11), RESULTS_LENGTH INT(11), ANSWERS VARCHAR(256), CORRECTIONS VARCHAR(256), INFOBOXES VARCHAR(256), SUGGESTIONS VARCHAR(256), UNRESPONSIVE_ENGINES VARCHAR(256));``
``mysql> create table VIDEOS(QUERY VARCHAR(256), PAGENO INT(11), PAGING BOOLEAN, SAFE_SEARCH INT(11), LANGUAGE VARCHAR(256), TIME_RANGE VARCHAR(256), ENGINES VARCHAR(256), RESULTS VARCHAR(256), RESULTS_NUMBER INT(11), RESULTS_LENGTH INT(11), ANSWERS VARCHAR(256), CORRECTIONS VARCHAR(256), INFOBOXES VARCHAR(256), SUGGESTIONS VARCHAR(256), UNRESPONSIVE_ENGINES VARCHAR(256));``
``mysql> quit``
MySql is done !
Installation
~~~~~~~~~~~~
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment