0

Installing Mura on a brand new machine and local MySQL 5.7 database. Per the install instructions I browse to the Mura index.cfm file to complete the installation. I enter in the database and DSN info. After a few seconds I get an error message.

Error Executing Database Query.

Datasource: muracms

SQL: CREATE TABLE IF NOT EXISTS tuserremotesessions ( userID char(35) default NULL, authToken char(32) default NULL, data text, created datetime default NULL, lastAccessed datetime default NULL, PRIMARY KEY (userID) )

Code: 42000

Type: 42000

All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead

Refreshing browser page results in this error again. I can see that tables have already been created in the database. I have been unsuccessful at attempts to internet search for a solution.

Does anyone have an idea of what I can do to get past this error? I have successfully installed Mura on other servers before so I'm really stumped.

Sam M
  • 4,136
  • 4
  • 29
  • 42

1 Answers1

0

For those who run into this error, it is due to a change in MySql 5.7 from how MySql 5.6 worked. See http://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-3.html. Specifically

Columns in a PRIMARY KEY must be NOT NULL, but if declared explicitly as NULL produced no error. Now an error occurs. For example, a statement such as CREATE TABLE t (i INT NULL PRIMARY KEY) is rejected.

I edited the create table statements for several tables in {murahome}/requirements/mura/dbUpdates/5.2.0.cfm to remove the default NULL statement on two tables and then everything worked fine.

Sam M
  • 4,136
  • 4
  • 29
  • 42
  • 1
    0 down vote Thanks for sharing your findings. In the future, please feel free to submit a ticket on our project at https://github.com/blueriver/MuraCMS/issues Cheers, Steve – Steve Withington Aug 21 '15 at 19:03