Sharif-Judge
Sharif-Judge copied to clipboard
Can't create table
When installing, it popped up an error that it could not create the shj_assignments table\
Sorry for my English
Maybe try connect root user @database server in config (application/config/database.php). If there are some problems, go ahead. Sorry 4 my english.
I have a solution may be can help you
Step 1 Because Blob/text columns can't have a default value in mysql. You can change the setting of mysql vim /etc/my.cnf
Step 2 Change sql-mode=" NO_ENGINE_SUBSTITUTION ,STRICT_TRANS_TABLES " To '#' sql-mode=" NO_ENGINE_SUBSTITUTION ,STRICT_TRANS_TABLES "
Step 3 service mysqld restart
then you could avoid the error of could not create the shj_assignments table but after you enter the web, you would get
The path to folder "assignments" is not set correctly. Move this folder somewhere not publicly accessible, and set its full path in Settings.
The path to folder "tester" is not set correctly. Move this folder somewhere not publicly accessible, and set its full path in Settings.
Step 4
Click the Settings on the left, and change the path of tester and assigments.
Done.
Hope this can help you.
Disable Strict Sql Mode in Mysql 5.7 or later
- To disable strict SQL mode, SSH in to your server as root and create this file:
$ vim /etc/mysql/conf.d/disable_strict_mode.cnf
- Open the file and enter these two lines:
[mysqld] sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
- Restart MySQL with this command:
$ sudo service mysql restart