Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing SQL tables after clean installation #53

Open
diegoproquo opened this issue Jan 8, 2024 · 3 comments
Open

Missing SQL tables after clean installation #53

diegoproquo opened this issue Jan 8, 2024 · 3 comments

Comments

@diegoproquo
Copy link

Hi, i am running a clean installation of Ubuntu 22.04, with php8.1, following all the steps from the official wiki. Everything looks and work fine, except for the permanent users. When i try to add a new one, an alert pops up with the message "Ajax communication failed". Going depper into the error through the console, i get this message: "SQLSTATE[42502]: Base table or view not found: 1146 Table `rd.realm_vlans' doesn´t exist". I check through the terminal into the rd database and indeed the table does not exist. Makes no sense to me because i imported all the tables following the guide, i have about 150. Does anyone know why is this missing?

@razametal
Copy link

Hi, I've the same issue with the start wizard.

XHRPOST
https://miip.ddns.net/cake4/rd_cake/wizards/new-site-step-one.json
[HTTP/1.1 500 Internal Server Error 226ms]

message
url "/wizards/new-site-step-one.json"
code 500
file "/var/www/rdcore/cake4/rd_cake/vendor/cakephp/cakephp/src/Database/Schema/Collection.php"
line 160

@razametal
Copy link

Solved,

I need to apply some patches to mysql tables:

mysql -u root rd < /var/www/rdcore/cake4/rd_cake/setup/db/8.079_add_ppsk_field.sql
mysql -u root rd < /var/www/rdcore/cake4/rd_cake/setup/db/8.080_add_cell_density.sql
mysql -u root rd < /var/www/rdcore/cake4/rd_cake/setup/db/8.081_update_node_neighbors.sql

Now the installation is working fine.

@razametal
Copy link

razametal commented Feb 6, 2024

I have created a script to populate the database and its patches.

Create a fille at /var/www/html/cake4/rd_cake/setup/db/setupdb.sh

#!/bin/bash

PATCH_LIST=`sudo ls /var/www/rdcore/cake4/rd_cake/setup/db/ | grep ".sql" | grep -v rd.sql`
MYSQL_USER=root
MYSQL_DB=rd

 	sudo mysql -u $MYSQL_USER $MYSQL_DB < /var/www/html/cake4/rd_cake/setup/db/rd.sql

for PATCH in $PATCH_LIST 
do
 echo "Procesando $PATCH"
 	sudo mysql -u $MYSQL_USER $MYSQL_DB < $PATCH
done

Make it executable:

chmod a+x /var/www/html/cake4/rd_cake/setup/db/setupdb.sh

and execute it:

/var/www/html/cake4/rd_cake/setup/db/setupdb.sh

`Procesando 8.058_add_opt_in_for_ctc.sql

Procesando 8.059_add_dynamic_detail_ctcs.sql

Procesando 8.060_add_lost_pwd_method.sql

Procesando 8.061_add_coova_settings.sql

Procesando 8.062_add_private_psk.sql

Procesando 8.063_add_cloud_settings.sql

Procesando 8.064_add_dynamic_client_type.sql

Procesando 8.065_add_dynamic_client_nas_settings.sql

Procesando 8.066_add_otp.sql

Procesando 8.067_add_fup.sql

Procesando 8.068_add_email_sms_histories.sql

Procesando 8.069_add_wifi_schedules.sql

Procesando 8.070_add_mac_actions.sql

Procesando 8.071_add_firewall_profiles.sql

Procesando 8.072_add_more_batman_adv.sql

Procesando 8.073_add_isp_specifics.sql

Procesando 8.074_add_hotspot2.0.sql

Procesando 8.075_add_site_field.sql

Procesando 8.076_add_fast_roaming.sql

Procesando 8.077_add_accel_ppp.sql

Procesando 8.078_add_apdesk_enhancements.sql

Procesando 8.079_add_ppsk_field.sql

Procesando 8.080_add_cell_density.sql

Procesando 8.081_update_node_neighbors.sql
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants