How to Install TACTIC and use MySQL as Database

 

Instructions for Fedora/Linux
 
note:
-Applies to TACTIC version 3.9.0.v05+
-MySQL works in 3.9 but it has not been thoroughly tested yet (full support for MSQL will be available in TACTIC 4.0)
 
 
1) Check if you have mysql or mysql server installed.
 
    rpm -q mysql
 
   Use this command to install mysql and mysql server in fedora
 
    yum install mysql mysql-server mysql-devel python-devel MySQL-python gcc python-setuptools
 
    More details here if you need it: http://www.wikihow.com/Install-MySQL-on-Fedora
 
 
2) Start the MySQL service
 
    service mysqld start
 
3) Set up MySQL
 
    /usr/bin/mysql_secure_installation
 
    note: for this tutorial we have set the password to: south123paw
 
    note: if you get the following error, it may be because you have not started the MySQL service (in step #2) yet:
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
 
4) Test logging into MySQL
 
    mysql -h localhost -u root -p
 
    eg, -show stuff in database
 
    show databases;
    use <database_name>;
    show tables;
    describe <database_table_name>;
 
5) Download TACTIC 3.9 and extract to a temp folder
 
6) Follow the setup instructions here with one exception:
 
 
    Exception:
    
        for the install.py step, running the following to install TACTIC *without* the database:
 
    python src/install/install.py --install_db False
 
7) Edit the following lines in the TACTIC config file:
 
            <TACTIC_INSTALL_DIR>tactic_data/config/tactic-config.xml
 
 
     <database>
       <vendor>MySQL</vendor>
       <server>localhost</server>
       <port>3306</port>
       <user>root</user>
       <password>south123paw</password>
       <sobject_database>sthpw</sobject_database>
     </database>
 
8) Run the TACTIC sql_convert.py script.
    (It will convert the generic SQL TACTIC database setup script to MySQL specifically)
 
    cd <TACTIC_INSTALL_DIR>/src/pyasm/search/upgrade/mysql
 
        python sql_convert.py
 
    And run the boot strap script to create the sthpw database in the MySQL database:
 
        python bootstrap_load.py
 
9) Run the upgrade script for the database:
 
    python <TACTIC_INSTALL_DIR>/src/bin/upgrade_db.py -f
 
10) Start TACTIC
 
    python <TACTIC_INSTALL_DIR>/src/bin/startup.py
 

 

System-Admin

Comments

Submitted by focusgfx on

Hi, I've downloaded Tacic 3.9 V5 and installed it fine..however when trying to run the file "bootstrap_load.py" after running the "sql_convert.py" file
the database gives me an error
1071, 'Specified key was too long; max key length is 767 bytes'
and I know that this error is caused by trying to set the key value length more than 767 which is the maximum that mysql can handle in key length.
this made me think that the current mysql character encoding "utf8" is the problem and the database should be encodd in ansi, so I switched the database character set to "latin" and the script "bootstrap_load.py" worked fine, but when trying to create a new project, the error showed up again!
that means Tactic is trying to set the key length more that 767 again!!
now, why is this happening ? should'nt the database been converted to mysql with the file "sql_convert.py" ? or is something is wrong with the conversion ?
please guid me of what I'm doing wrong,
thanks in advance.