Max Amigo Posted October 8, 2021 Share Posted October 8, 2021 When I try to create a database as a customer in Froxlor, I always get an error: A database error occurred SQLSTATE[HY000]: General error: 1007 Can't create database 'editor1sql1'; database exists In the database list I see nothing: Databases (0 / 0) Any idea? p.s. Before this error, I saw error that my DB root user doesn't have permissions on 'editor1sql1' table. Link to comment Share on other sites More sharing options...
0 Max Amigo Posted October 8, 2021 Author Share Posted October 8, 2021 Now it works. Here is SQL that fixed permission issues: GRANT ALL PRIVILEGES ON *.* TO 'dbadmin'@'localhost' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO 'dbadmin'@'127.0.0.1'WITH GRANT OPTION; FLUSH PRIVILEGES; Link to comment Share on other sites More sharing options...
0 d00p Posted October 8, 2021 Share Posted October 8, 2021 The message is pretty clear...the database already exists...seems like something manually happened here as froxlor increases the internal database-counter per customer and hence should just create sql2 ...or are you repeatingly pressing f5 and resending the form? Link to comment Share on other sites More sharing options...
0 Max Amigo Posted October 8, 2021 Author Share Posted October 8, 2021 (edited) So, I deleted the manually DB 'editor1sql1' and user 'editor1sql1'@'127.0.0.1'. Then I repeated the process again and I have the initial error: A database error occurred SQLSTATE[42000]: Syntax error or access violation: 1044 Access denied for user 'dbadmin'@'127.0.0.1' to database 'editor1sql1' Error: SQLSTATE[HY000]: General error: 1007 Can't create database 'editor1sql1'; database exists Is a cascading result of this one. As a side note: I don't know much about mysql, but might it be somehow related to this?? mysql> SELECT User, Host FROM mysql.user; +------------------+-----------------+ | User | Host | +------------------+-----------------+ | dbadmin | 127.0.0.1 | | editor1sql1 | 127.0.0.1 | | froxlor | 127.0.0.1 | <-- IP address | froxlor | XXX.XXX.XXX.XXX | <-- My public IP address? | dbadmin | localhost | <-- DB root | debian-sys-maint | localhost | <-- localhost | froxlor | localhost | | mysql.infoschema | localhost | | mysql.session | localhost | | mysql.sys | localhost | | root | localhost | +------------------+-----------------+ 11 rows in set (0.00 sec) This is how I created my mysql users: CREATE DATABASE froxlor; CREATE USER 'froxlor'@'localhost' IDENTIFIED BY 'pass1'; GRANT ALL PRIVILEGES ON froxlor.* TO 'froxlor'@'localhost'; CREATE USER 'froxlor'@'127.0.0.1' IDENTIFIED BY 'pass1'; GRANT ALL PRIVILEGES ON froxlor.* TO 'froxlor'@'127.0.0.1'; FLUSH PRIVILEGES; CREATE USER 'dbadmin'@'localhost' IDENTIFIED BY 'pass2'; GRANT ALL PRIVILEGES ON *.* TO 'dbadmin'@'localhost'; CREATE USER 'dbadmin'@'127.0.0.1' IDENTIFIED BY 'pass2'; GRANT ALL PRIVILEGES ON *.* TO 'dbadmin'@'127.0.0.1'; FLUSH PRIVILEGES; Edited October 8, 2021 by Max Amigo added more info Link to comment Share on other sites More sharing options...
0 d00p Posted October 8, 2021 Share Posted October 8, 2021 so, you are using your own administrative user for the root-actions (dbadmin) - seems like this user does not have the privileges to create databases... Link to comment Share on other sites More sharing options...
0 Max Amigo Posted October 8, 2021 Author Share Posted October 8, 2021 Can I just export all my setting from froxlor and reset whole installation with proper 'root' user for mysql? Can I re-use those setting to setup froxlor faster? Link to comment Share on other sites More sharing options...
0 d00p Posted October 8, 2021 Share Posted October 8, 2021 you could grant that dbadmin user required permissions or you could just adjust froxlor/lib/userdata.inc.php and set another user (e.g. root) Link to comment Share on other sites More sharing options...
0 d00p Posted October 8, 2021 Share Posted October 8, 2021 17 minutes ago, Max Amigo said: CREATE USER 'dbadmin'@'localhost' IDENTIFIED BY 'pass2'; GRANT ALL PRIVILEGES ON *.* TO 'dbadmin'@'localhost'; CREATE USER 'dbadmin'@'127.0.0.1' IDENTIFIED BY 'pass2'; GRANT ALL PRIVILEGES ON *.* TO 'dbadmin'@'127.0.0.1'; FLUSH PRIVILEGES; you are missing a part for the "super user": GRANT ALL PRIVILEGES ON *.* TO 'dbadmin'@'localhost' WITH GRANT OPTION; Link to comment Share on other sites More sharing options...
0 d00p Posted October 8, 2021 Share Posted October 8, 2021 Just now, Max Amigo said: Now it works. Here is SQL that fixed permission issues: GRANT ALL PRIVILEGES ON *.* TO 'dbadmin'@'localhost' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO 'dbadmin'@'127.0.0.1'WITH GRANT OPTION; FLUSH PRIVILEGES; hahaha I was a second too slow Link to comment Share on other sites More sharing options...
0 Max Amigo Posted October 8, 2021 Author Share Posted October 8, 2021 Thank you d00p! Now it works! Truly smart software! RESPEK! Link to comment Share on other sites More sharing options...
Question
Max Amigo
When I try to create a database as a customer in Froxlor, I always get an error:
A database error occurred
SQLSTATE[HY000]: General error: 1007 Can't create database 'editor1sql1'; database exists
In the database list I see nothing: Databases (0 / 0)
Any idea?
p.s. Before this error, I saw error that my DB root user doesn't have permissions on 'editor1sql1' table.
Link to comment
Share on other sites
9 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now