Doesn't create tables in database
Closed this issue · 7 comments
Hi,
I'm using ajax-seo and I installed everything. I removed the comments in .htacces and I created a database, but it doesn't upload the pages or the table to the database.
Do I need to create the table 'ajax-seo' first?
Can you please help me?
Thanks!
Thanks Quincy for your issue!
Did you use the recent https://github.com/laukstein/ajax-seo code?
Is everything working fine, when you use the not modified AJAX SEO code?
What is your PHP and MySQL version?
If you follow installation steps correctly, then the bd table must be created automatically, see line connect.php#L69
.
Could you check if really db table has not been created?
What happens when you try to run SQL query:
CREATE TABLE IF NOT EXISTS `ajax-seo-test` (
id int AUTO_INCREMENT PRIMARY KEY,
array int NOT NULL,
url char(70) NOT NULL,
`meta-title` char(70) NOT NULL,
`meta-description` char(154) NOT NULL,
title char(70) NOT NULL,
content text NOT NULL,
updated datetime NOT NULL,
created timestamp DEFAULT current_timestamp
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
and after
CREATE TRIGGER updated BEFORE UPDATE ON `' . MYSQL_TABLE . '` FOR EACH ROW SET new.updated=NOW()
and
INSERT INTO `ajax-seo-test` (array, url, `meta-title`, `meta-description`, title, content) VALUES
(1, '', '', 'AJAX SEO is crawlable framework for AJAX applications.', 'Home', 'AJAX SEO is crawlable framework for AJAX applications that applies the latest SEO standards, Page Speed and YSlow rules, Google HTML/CSS Style Guide, etc. to improve maximal performance, speed, accessibility and usability.<br>\nThe source code is build on latest Web technology, HTML Living Standard - HTML5, CSS3, Microdata, etc.'),
(2, 'about', 'About', '', '', 'About content'),
(3, 'test/url/nested-url', 'Nested URL', '', 'Nested URL', 'Nested URL example'),
(4, 'contact', 'Contact us', '', 'Contact', 'Contact content'),
(5, 'контакты', 'Контакты', '', '', 'Содержание контактом'),
(6, 'צור-קשר', 'צור קשר', '', '', 'תוכן לצור קשר')
Thanks for your fast response.
I used the recent ajax-seo on your Github.
Now I added this:
CREATE TABLE IF NOT EXISTS ajax-seo-test
(
id int AUTO_INCREMENT PRIMARY KEY,
array int NOT NULL,
url char(70) NOT NULL,
meta-title
char(70) NOT NULL,
meta-description
char(154) NOT NULL,
title char(70) NOT NULL,
content text NOT NULL,
updated datetime NOT NULL,
created timestamp DEFAULT current_timestamp
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci
and I added the last:
INSERT INTO ajax-seo-test
(array, url, meta-title
, meta-description
, title, content) VALUES
(1, '', '', 'AJAX SEO is crawlable framework for AJAX applications.', 'Home', 'AJAX SEO is crawlable framework for AJAX applications that applies the latest SEO standards, Page Speed and YSlow rules, Google HTML/CSS Style Guide, etc. to improve maximal performance, speed, accessibility and usability.
\nThe source code is build on latest Web technology, HTML Living Standard - HTML5, CSS3, Microdata, etc.'),
(2, 'about', 'About', '', '', 'About content'),
(3, 'test/url/nested-url', 'Nested URL', '', 'Nested URL', 'Nested URL example'),
(4, 'contact', 'Contact us', '', 'Contact', 'Contact content'),
(5, 'контакты', 'Контакты', '', '', 'Содержание контактом'),
(6, 'צור-קשר', 'צור קשר', '', '', 'תוכן לצור קשר')
But I don't know what the last part is:
CREATE TRIGGER updated BEFORE UPDATE ON ajax-seo-test
FOR EACH ROW SET new.updated = NOW( )
I get this error message: #1227 - Access denied; you need the SUPER privilege for this operation
Thanks.
As you see, you need to enable full permissions for your MySQL database. After it, the issue is solved.
This query automatically updates your post last modified date when ever you do the smallest change to your post. It helps to post to be cached correctly and the most effectively, and to respond the current last modified date to search engines as Google, Yahoo, Bing, etc.
CREATE TRIGGER updated BEFORE UPDATE ON ajax-seo-test FOR EACH ROW SET new.updated = NOW( )
Yeah, but I can't get the full permissions.
Hmm.. Than I'll try it without ajax-seo. Thanks!
It will work you fine also without
CREATE TRIGGER updated BEFORE UPDATE ON ajax-seo-test FOR EACH ROW SET new.updated = NOW( )
No, I still have problems with it.
But never mind, I already use other stuff to build my website.
Actually all you needs is an additional MySQL privilege for trigger
. Anyway without it, it mus work you fine too.