-
Notifications
You must be signed in to change notification settings - Fork 52
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
SQL Permissions checking seems to be broken #151
Comments
Ah I think I now get it. You're trying to change the database collation/char set: $docroot/recovery/install/src/Service/DatabaseService.php return $this->connection->exec(
sprintf(
'%s DATABASE `%s` CHARACTER SET `%s` COLLATE `%s`',
$dbExists ? 'ALTER' : 'CREATE',
$name,
$charset,
$collation
)
); Which is fine, but could you please check if that is already correct? root@mbaur:/var/log/mysql# mysql -e 'show create database shopware'
+----------+-------------------------------------------------------------------------------------------+
| Database | Create Database |
+----------+-------------------------------------------------------------------------------------------+
| shopware | CREATE DATABASE `shopware` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */ |
+----------+-------------------------------------------------------------------------------------------+ |
Also, the following SQL breaks for a use configured like 'shopware'@'10.128.3.%': $docroot/recovery/install/src/Service/DatabaseService.php $sql = <<<'EOL'
SELECT PRIVILEGE_TYPE, REPLACE(GRANTEE,"'","") AS _grantee
FROM information_schema.SCHEMA_PRIVILEGES
WHERE PRIVILEGE_TYPE=:priv AND TABLE_SCHEMA=:name
HAVING _grantee = USER()
OR _grantee=CONCAT(SUBSTRING_INDEX(USER(),'@',1),'@%')
EOL; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Command I ran:
Output:
But permissions should be enough:
The text was updated successfully, but these errors were encountered: