The user specified as a definer ('usernames'@'') does not exist
Posted on 2014-11-09
Hope someone can help. I am trying to move a web site off an old non-cPanel CentOS 5.0 server with MySQL 5.1.52 and PHP 5.2.16 to a new cPanel CentOS 6.5 server with MySQL 5.5.37 and PHP 5.4.31.
This query relates to two tables in the main database:
The core_news table has loads of data in it which is supposed to display on the "News" page on the site. I have no idea that the core_news_view table is for but on both servers it appears to be an empty table.
I have moved the site and most of the database-related items, such as logins, etc., all work fine. However, there is one item - core_news_view - that doesn't. When I do a phpMyAdmin check on the database it comes up with this:
core_news_view The user specified as a definer ('usernames'@'') does not exist
core_news_view The table is corrupt
It appears that on the old server there is also no data in this table and when I check the database on that server I get:
core_news_view View `core_news_view` has no creation context
On the old server the content of the main news table (core_news) table is populated and being read perfectly and displays fine. On the new server the core_news table is correctly populated with the scores of news items that the site should be displaying.
On the new server I get a blank area on the page where the data is supposed to display and looking in the error_log file I get this:
[09-Nov-2014 20:32:34 PHP Warning: Illegal string offset 'id' in /home/user/public_html/news.php on line 38
[09-Nov-2014 20:32:34 PHP Warning: Illegal string offset 'intro' in /home/user/public_html/news.php on line 46
[09-Nov-2014 20:32:34 PHP Warning: Illegal string offset 'id' in /home/user/public_html/news.php on line 50
I hope I've given enough information to get you started sleuthing the problem for me and look forward to hearing from you in the hope I can resolve this fairly quickly.