Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Error! Invalid database name. #527

shefik opened this Issue · 13 comments

4 participants


I get this message when trying to do a clean install:

"Error! Invalid database name. Please use only letters, numbers, '-' or '_' with a maximum of 64 characters."

However, when I use MAMP to create a MySQL database, I am able to successfully create new database, with a name such as:


So, is there any particular reason why Zikula has that database naming restriction? MySQL doesn't appear to have such a restriction. Can we remove that restriction in Zikula?


I can not confirm the problem with my mamp. Which versions of php and mysql are you using?


Sorry. I don't understand really.

When do you get this error under which system?


@shefik can you give us some more details. Thanks


Actually, you can reproduce this so: Create a database called test.test via phpmyadmin. Now try to install Zikula using this database. The installer will tell you that he does not want to install Zikula using this database because it contains a ..
@shefik Now asks why Zikula checks the database name.

I think this is from times where Zikula was able to create a database on it's own.
IMHO we should remove this check. If the user somehow managed to create a database called "345..%&$:f-t5" Zikula should accept that and use it.



That is an accurate description of the issue.


I could not find something about a character limitation of database names in doctrine. But on the side your are on the secure side with "normal" characters.


@drak What is your opinion about it.


Having run a hosting company for more than a decade I can honestly say, I have never come across a mysql database with a . in it. not once. The convention is to use underscores and dashes e.g. yourdomain_com_-_zikula so such things so on that basis alone, I would not welcome removing the restriction. But, looking at the MySQL databse name restrictions they are not allowed... and remember, this has to be cross DB compliant so even if one DB allowed it, another might not: see


Permitted characters in unquoted identifiers: ASCII: [0-9,a-z,A-Z$_] (basic Latin letters, digits 0-9, dollar, underscore)

Database and table names cannot contain “/”, “\”, “.”, or characters that are not permitted in file names.

@ghost ghost closed this

@drak I think this issue needs to be reopened. While it's true it was not allowed in MySQL 5.0 (as referenced by the docs you quoted), that restriction no longer applies with newer versions of MySQL. It is now permissible.

"Before MySQL 5.1.6, database and table names cannot contain “/”, “\”, “.”, or characters that are not permitted in file names."


@shefik as I said, this is not just about MySQL, but all databases. There is no reason you need to have weirdly named databases.


I understand you are saying it's not just about MySQL. However, as of now, it shouldn't be considered "weirdly named". For example, I created a database that matches a host name (with "."). It is valid. If I choose to install Zikula on a MySQL database, I should be allowed to make use of what is permissible with MySQL.


@drak Ok, understandable.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.