MySQL Error Invalid Table or Database Name

We upgraded our MySQL server recently which ran several Joomla web sites

After the upgrade we discovered the following error in the mysql log files

090425 23:10:52 [ERROR] Invalid (old?) table or database name 'database-name'

It turns out MySQL does not like the use of - in database names.

One solution is to rename the MySQL database changing the - to an _

Then update the mysql dictionary

UPDATE mysql.db SET Db = 'database_name' WHERE Db = 'database\-name';
FLUSH PRIVILEGES;

Comments

  1. I am really enjoying reading your well written articles.
    It looks like you spend a lot of effort and time on your blog.
    I have bookmarked it and I am looking forward to reading new articles. Keep up the good work..
    ccna Training in Chennai
    ccna Training institute in Chennai
    Angularjs Course in Chennai
    Ethical Hacking Course in Chennai
    Tally Course in Chennai
    ccna course in chennai
    ccna training in chennai

    ReplyDelete

Post a Comment

Popular posts from this blog

Basic Send Message to MQ with Java and IBM MQ JMS

Basic Receive Message to MQ with Java and IBM MQ JMS

Configure Database Connection using MyBatis