October 8, 20214 yr 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.
October 8, 20214 yr 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?
October 8, 20214 yr Author 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, 20214 yr by Max Amigo added more info
October 8, 20214 yr 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...
October 8, 20214 yr Author 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?
October 8, 20214 yr 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)
October 8, 20214 yr Author Solution 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;
October 8, 20214 yr 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;
October 8, 20214 yr 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
Create an account or sign in to comment