TiagoSilvaPereira / vemto2-issues

Repository to track Vemto 2 Issues
5 stars 0 forks source link

schema-reader-db Error: Could not drop database `vemto_schema_reader`: SQLSTATE[HY000]: General error: 3681 Schema 'vemto_schema_reader' does not exist, but schema directory '.\vemto_schema_reader\' was found. This must be resolved manually (e.g. by moving the schema directory to another location). #129

Closed vimitali368 closed 6 months ago

vimitali368 commented 6 months ago

Error Message: schema-reader-db Error: Could not drop database vemto_schema_reader: SQLSTATE[HY000]: General error: 3681 Schema 'vemto_schema_reader' does not exist, but schema directory '.\vemto_schema_reader\' was found. This must be resolved manually (e.g. by moving the schema directory to another location).

Stack:

schema-reader-db Error: #0 phar://C:/Users/w11.vemto/AppData/Local/Programs/Vemto2/resources/static/VMTTL2/index.php(94): VemtoDBReader\DatabaseManager->dropDatabase('vemto_schema_re...')
#1 phar://C:/Users/w11.vemto/AppData/Local/Programs/Vemto2/resources/static/VMTTL2/common/Vemto.php(111): {closure}()
#2 phar://C:/Users/w11.vemto/AppData/Local/Programs/Vemto2/resources/static/VMTTL2/index.php(18): Vemto\Vemto::execute('schema-reader-d...', Object(Closure))
#3 C:\Users\w11.vemto\AppData\Local\Programs\Vemto2\resources\static\VMTTL2(14): require('phar://C:/Users...')
#4 {main}

Vemto 2.0.11 win32 10.0.25262 Locale: ru App version: 2.0.11

vimitali368 commented 6 months ago

It is a new project. image

vimitali368 commented 6 months ago

It seems that instead of connecting MySQL, the program is trying to use the Sqlite connection, this is confirmed by the commented connection settings lines: .env DB_CONNECTION=mysql DB_HOST=127.0.0.1

DB_PORT=981

DB_DATABASE=v2011_test2

DB_USERNAME=root

DB_PASSWORD=

vimitali368 commented 6 months ago

If instead of "Database - Read from a database", change "Migration - Read from migrations files", project will be open.

vimitali368 commented 6 months ago

Reinstalling did not give any result. I will try again to install a clean VM, environment and Vemto.

TiagoSilvaPereira commented 6 months ago

Hi @vimitali368 Vemto uses .vemto_settings file to connect to the database, not the .env file. It seems this issue is related to some MySql 8+ issues:

https://stackoverflow.com/questions/58454272/mysql-8-0-create-new-db-schema-directory-already-exists

vimitali368 commented 6 months ago

The problem was with the database. The vemto_schema_reader directory in the data\mysql-8\ folder remains from previous installations. Manually deleting this directory helped.

TiagoSilvaPereira commented 6 months ago

@vimitali368 thanks; I'll add a tip to this on the error page