Booked Scheduler Community Support
July 22, 2018, 09:59:11 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Booked is proud to recommend Shift Capsule in the employee shift scheduling space www.ShiftCapsule.com
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: MySQL Errors on installation  (Read 280 times)
crogers
Newbie
*

Karma: 0
Posts: 2


« on: May 18, 2018, 03:22:52 PM »

I am trying to install Booked Scheduler on a server running RHEL 7, PHP 7.1, and MariaDB (mysql  Ver 15.1 Distrib 5.5.56-MariaDB, for Linux (x86_64) using readline 5.1).

I'm getting several database errors when running the installation.  Is there a preferred version of MySQL that I need to use?  All I saw was >5.5 in the Readme file.

Install Booked Scheduler (MySQL only)
Executing: ../../database_schema/create-db.sql
Success
Executing: ../../database_schema/create-schema.sql
Success
Executing: ../../database_schema/create-user.sql
Failed. Details:
SQL Statement:

GRANT ALL on bookedscheduler.* to 'bookedscheduler_user'@'127.0.0.1' identified by 'password'

Error Code:

1470

Error Text:

String 'bookedscheduler_user' is too long for user name (should be no longer than 16)

Executing: ../../database_schema/create-data.sql
Success
Executing: ../../database_schema/sample-data-utf8.sql
Success
Executing: ../../database_schema/upgrades/2.1/schema.sql
Failed. Details:
SQL Statement:


ALTER TABLE `resources` ADD COLUMN `admin_group_id` SMALLINT(5) unsigned

Error Code:

1060

Error Text:

Duplicate column name 'admin_group_id'

Executing: ../../database_schema/upgrades/2.1/data.sql
Failed. Details:
SQL Statement:

insert into roles values (3, 'Resource Admin', 3)

Error Code:

1062

Error Text:

Duplicate entry '3' for key 'PRIMARY'

Executing: ../../database_schema/upgrades/2.2/schema.sql
Failed. Details:
SQL Statement:

DROP TABLE IF EXISTS `custom_attributes`

Error Code:

1217

Error Text:

Cannot delete or update a parent row: a foreign key constraint fails

Executing: ../../database_schema/upgrades/2.2/data.sql
Success
Executing: ../../database_schema/upgrades/2.3/schema.sql
Failed. Details:
SQL Statement:

ALTER TABLE `schedules` ADD COLUMN `admin_group_id` SMALLINT(5) unsigned

Error Code:

1060

Error Text:

Duplicate column name 'admin_group_id'

Executing: ../../database_schema/upgrades/2.3/data.sql
Failed. Details:
SQL Statement:

insert into roles values (4, 'Schedule Admin', 4)

Error Code:

1062

Error Text:

Duplicate entry '4' for key 'PRIMARY'

Executing: ../../database_schema/upgrades/2.4/schema.sql
Failed. Details:
SQL Statement:


ALTER TABLE `time_blocks` ADD COLUMN `day_of_week` SMALLINT(5) unsigned

Error Code:

1060

Error Text:

Duplicate column name 'day_of_week'

Executing: ../../database_schema/upgrades/2.4/data.sql
Success
Executing: ../../database_schema/upgrades/2.5/schema.sql
Failed. Details:
SQL Statement:


ALTER TABLE `resources` ADD COLUMN `resource_type_id` mediumint(Cool unsigned

Error Code:

1060

Error Text:

Duplicate column name 'resource_type_id'

Executing: ../../database_schema/upgrades/2.5/data.sql
Success
Executing: ../../database_schema/upgrades/2.6/schema.sql
Failed. Details:
SQL Statement:

# noinspection SqlNoDataSourceInspectionForFile
ALTER TABLE `custom_attributes`
  ADD COLUMN `admin_only` TINYINT(1) UNSIGNED

Error Code:

1060

Error Text:

Duplicate column name 'admin_only'

Executing: ../../database_schema/upgrades/2.6/data.sql
Success
 
There were problems with the installation. Please correct them and retry the installation.
Logged
mdbarber
Newbie
*

Karma: 0
Posts: 3


« Reply #1 on: June 05, 2018, 12:39:57 PM »

Did you get to the bottom of this?
I am doing a testing install on an Ubuntu LAMP svr VM and am hitting the same problem.
It's a clean install so am probably missing some package but can't find a complete list of dependencies.
If i don't bother with the install page I can get to the login page no problem but every route i try from there ends in
"
Unknown Error
Return to the last page that you were on "

my gut tells me this is an issue with database permissions but don't have a huge amount of time to spend on this.
tia
mdb



Logged
mdbarber
Newbie
*

Karma: 0
Posts: 3


« Reply #2 on: June 05, 2018, 09:01:23 PM »

ahhhh curse my eyes

embarrassingly i had missed the difference between the "bookedscheduler_user" in the database creation and the booked_user in the config file changed config to match and hey presto Cheesy
Logged
crogers
Newbie
*

Karma: 0
Posts: 2


« Reply #3 on: June 07, 2018, 05:44:01 PM »

I actually changed booked_user to bkuser in my config file, but still got the same error.
Logged
mdbarber
Newbie
*

Karma: 0
Posts: 3


« Reply #4 on: June 07, 2018, 09:24:14 PM »

?
the install creates the user "bookedscheduler_user" the default user in the config file is "booked_user"
the only logic i can come up with is that during the install process the 1st is created but then the name from the config file is used to finish/perform updates as this does not match the user created by the install there is no permissions granted by mysql for the following operations and hence the install fails to complete.
The solutions are
1 to confirm the config files has the name booked_user replaced with bookedscheduler_user before the automated process is used
2 manually create the booked_user beforehand ooorrrrr
3. edit the install source to replace the "bookedscheduler_user" with "booked_user" which will then match the config file.
The first one is probably the easiest...
Logged
davemason
Full Member
***

Karma: 0
Posts: 246


« Reply #5 on: June 08, 2018, 03:20:58 PM »

I'm not sure that this is quite the problem. I test built booked 2.6.8 on a Ubuntu 14.04 LTS server this afternoon and even with the config user set to bookedscheduler_user I still hit this same database creation issue.

I think you're closer with the permissions issue in general though as if I use root as my booked_user in config (and again in the Web/install), everything works fine. I wouldn't suggest this as a production built solution but I think creating the user manually ahead of time is the most robust solution.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!