I'm using xampp to handle php, mysql and apahce. The older version xampp is using the MySQL, and the latest version is using the MariaDB. I'm upgrade xampp and testlink as below:
# mysqldump -u root -p testlink > ~/backup.sql
# mv /opt/lampp /opt/lampp.bak
/opt/lampp/htdocs/testlink
# mysql -u root -p testlink < ~/backup.sql
Then http://localhost/testlink/login.php shows:
You need to proceed with Manual upgrade of your DB scheme to DB 1.9.15
- Read README file!
I've also checked the http://localhost/testlink/README:
- Upgrade from 1.9.14 to 1.9.15 WARNING: if you are using a table prefix replace /prefix/ with your prefix
a) Execute install/sql/alter_tables/1.9.15/<your_db>/DB.1.9.15/step1/db_schema_update.sql
b) Execute (IF EXISTS) install/sql/alter_tables/1.9.15/<your_db>/DB.1.9.15/stepZ/z_final_step.sql
But I don't know how to execute a sql script in commandline.
====
# mysql_update -u root -p
to update the database,
but looks like nothing changed.# mysql -u root -p --force testlink < ~/backup.sql
, but nothing changes also.Can anyone help me?
Okay, finally I understand how to update the db schame. Here is the way:
# mysql -u root -p
MariaDB [(none)]> use testlink;
MariaDB [testlink]> source /opt/lampp/htdocs/testlink/install/sql/alter_tables/1.9.14/mysql/DB.1.9.14/step1/db_schema_update.sql
MariaDB [testlink]> source /opt/lampp/htdocs/testlink/install/sql/alter_tables/1.9.14/mysql/DB.1.9.14/stepZ/z_final_step.sql
MariaDB [testlink]> source /opt/lampp/htdocs/testlink/install/sql/alter_tables/1.9.15/mysql/DB.1.9.15/step1/db_schema_update.sql
MariaDB [testlink]> source /opt/lampp/htdocs/testlink/install/sql/alter_tables/1.9.15/mysql/DB.1.9.15/stepZ/z_final_step.sql
DONE!
The truth is, want to upgrade a lower version testlink to a higher version, then it should be execute the /opt/lampp/htdocs/testlink/install/sql/alter_tables/**/step1/db_schema_update.sql
and /opt/lampp/htdocs/testlink/install/sql/alter_tables/**/stepZ/db_schema_update.sql
step by step. For example, if want to upgrade testlink from 1.9.10
to 1.9.15
, then the db schema should be upgrade as below: