1 (edited by chris 2004-11-26 18:38)

Topic: PunBB 1.2-dev (01 Nov) - Unable to create indexes

Felt lucky today but the dev won't work here (apache 1.3.x - mysql 4.0.18):

install.php

An error was encountered
Unable to create indexes. Please check your configuration and try again.

A 1.1.5 works perfect on the same box so I assume it't a dev only problem. Any clue?

Didn't find anything here, or overlooked it. If this is the case: link please and sorry.

Re: PunBB 1.2-dev (01 Nov) - Unable to create indexes

That's odd. Was that in an empty database?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

3

Re: PunBB 1.2-dev (01 Nov) - Unable to create indexes

Yes. The script created 17 tables in the db (1.1.5 did 15 tables). Tried with and without prefix. Installed a PunBB 1.1.5 and a phpBB 2.0.11 from scratch for testing = no problems at all (install and use). My main PunBB forum is running on the same maschine for month now.

Re: PunBB 1.2-dev (01 Nov) - Unable to create indexes

I'm sorry, but I have no idea what the problem is. I've rewritten the install script somewhat now, so in the next release, you should at least get a more constructive error message.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

5

Re: PunBB 1.2-dev (01 Nov) - Unable to create indexes

Always hate it when I'm the only one with a weird problem. :-) Thx!

6

Re: PunBB 1.2-dev (01 Nov) - Unable to create indexes

i'm getting the exactly same problem.

so you're not that alone. ;)

Re: PunBB 1.2-dev (01 Nov) - Unable to create indexes

Could one of you contact me on IRC? I'm in #punbb on quakenet. I would like to find out what's wrong before I release a beta.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

8

Re: PunBB 1.2-dev (01 Nov) - Unable to create indexes

Tried the beta and as you promissed there is additional info now.

Choosing MySQL 3.2.*,4.0.*

An error occured on line 1240 in file /xxx.xxx.org/forum2/install.php.

PunBB reported: Unable to create indexes. Please check your configuration and try again.

Database reported: Access denied for user: 'xxx@localhost' to database 'xxx' (Errno: 1044)

Last is confusing since the tables getting created.

Again, PunBB 1.1.5 is running perfect on that box.

Re: PunBB 1.2-dev (01 Nov) - Unable to create indexes

maybe you could try running the indexes separatly too see if its just one of them

CREATE INDEX <prefix>online_user_id_idx ON <prefix>online(user_id);
CREATE INDEX <prefix>posts_topic_id_idx ON <prefix>posts(topic_id);
CREATE INDEX <prefix>posts_multi_idx ON <prefix>posts(poster_id, topic_id);
CREATE INDEX <prefix>reports_zapped_idx ON <prefix>reports(zapped);
CREATE INDEX <prefix>search_matches_word_id_idx ON <prefix>search_matches(word_id);
CREATE INDEX <prefix>search_matches_post_id_idx ON <prefix>search_matches(post_id);
CREATE INDEX <prefix>topics_forum_id_idx ON <prefix>topics(forum_id);
CREATE INDEX <prefix>topics_moved_to_idx ON <prefix>topics(moved_to);
CREATE INDEX <prefix>users_registered_idx ON <prefix>users(registered);

if you replace <prefix> with your prefix thats the mysql queries

10 (edited by chris 2005-01-08 11:45)

Re: PunBB 1.2-dev (01 Nov) - Unable to create indexes

Connorhd wrote:

maybe you could try running the indexes separatly too see if its just one of them

I do not have a shell account on this box. Only phpMyAdmin. Furter is my db knowledge greatly limited. Maybe these screenshots are helping:

<removed>

Re: PunBB 1.2-dev (01 Nov) - Unable to create indexes

chris: It appears as if your user doesn't have permissions to add indexes to the database. That's weird. Try running the queries Connorhd posted through phpMyAdmin (click SQL).

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: PunBB 1.2-dev (01 Nov) - Unable to create indexes

ok if you click the SQL button at the top and put in these lines one at a time and run them to see what errors you get...

CREATE INDEX online_user_id_idx ON online(user_id);
CREATE INDEX posts_topic_id_idx ON posts(topic_id);
CREATE INDEX posts_multi_idx ON posts(poster_id, topic_id);
CREATE INDEX reports_zapped_idx ON reports(zapped);
CREATE INDEX search_matches_word_id_idx ON search_matches(word_id);
CREATE INDEX search_matches_post_id_idx ON search_matches(post_id);
CREATE INDEX topics_forum_id_idx ON topics(forum_id);
CREATE INDEX topics_moved_to_idx ON topics(moved_to);
CREATE INDEX users_registered_idx ON users(registered);

13

Re: PunBB 1.2-dev (01 Nov) - Unable to create indexes

I get each time a #1044 - Access denied for user: 'xxx@localhost' to database 'xxx'
Seems I have to write the provider a nice e-mail.

Re: PunBB 1.2-dev (01 Nov) - Unable to create indexes

the wierd thing is doesn't 1.1.5 also create indexes?

15

Re: PunBB 1.2-dev (01 Nov) - Unable to create indexes

The provider has no hunch either. Not sure he is trying. Found in his forum one thread with the same error message (CMS), but no solution was found.

Thx Connorhd & Rickard for there help!

Re: PunBB 1.2-dev (01 Nov) - Unable to create indexes

I have the same problem and I see that :

when you are simply trying to:
C:\mysql\bin>mysql -uroot -p mysql

and you get:

ERROR 1044: Access denied for user: '@127.0.0.1' to database 'mysql'

Here is what I do. The key is to supply your real ip address for the -h (host) parameter. On windows, from the command prompt type 'ipconfig' to see your ip address. Once you have that, do the following:

C:\mysql\bin>mysql -h 192.168.0.1 -u root -p mysql
Enter password: ****************

// then I explicitly add root@127.0.0.1 to the user table, so after this I can log in as you would expect

GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY 'root-password' WITH GRANT OPTION;

GRANT ALL PRIVILEGES ON *.* TO root@127.0.0.1 IDENTIFIED BY 'root-password' WITH GRANT OPTION;

// delete anon accounts

DELETE FROM mysql.user WHERE password='';

FLUSH PRIVILEGES;

It works for me

One other way is when you set the initial password for the root user, also set it on 127.0.0.1:

SET PASSWORD FOR root@localhost=PASSWORD('new_password');
SET PASSWORD FOR root@127.0.0.1=PASSWORD('root-password');
FLUSH PRIVILEGES;

[img]http://www.famfamfam.com/lab/icons/silk/icons/error.png[/img] /me speaks French and bad English [img]http://www.famfamfam.com/lab/icons/silk/icons/error.png[/img]

Re: PunBB 1.2-dev (01 Nov) - Unable to create indexes

You could try adding the indexes using ALTER instead of CREATE, you may have permissions for that.

ie

ALTER TABLE online ADD INDEX online_user_id_idx(user_id);

Re: PunBB 1.2-dev (01 Nov) - Unable to create indexes

Nibbler: I don't believe that will be any different. From the MySQL manual: "In MySQL 3.22 or later, CREATE INDEX is mapped to an ALTER TABLE statement to create indexes."

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: PunBB 1.2-dev (01 Nov) - Unable to create indexes

I just had a look in the manual, and it appears as if the index privilege only applies to adding and dropping indexes after the table has been created. What you need is to have your host grant you the index privilege on the database in question.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: PunBB 1.2-dev (01 Nov) - Unable to create indexes

kiplantt first of all best not to use root for everything

secondly C:\mysql\bin>mysql -uroot -p mysql did not work as you missed a space between u and root so it didn't pick up a user hence nothing before the @ in ERROR 1044: Access denied for user: '@127.0.0.1' to database 'mysql'

Re: PunBB 1.2-dev (01 Nov) - Unable to create indexes

Connorhd: Actually, I don't believe you need a space there.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

22 (edited by Connorhd 2004-12-07 14:35)

Re: PunBB 1.2-dev (01 Nov) - Unable to create indexes

really? why does it say ERROR 1044: Access denied for user: '@127.0.0.1' to database 'mysql' instead of 'root@127.0.0.1' then?

hmm it does work with or without the space... confusing

Re: PunBB 1.2-dev (01 Nov) - Unable to create indexes

why aren't the indexes created in the CREATE TABLE command?

MySQL Manual CREATE INDEX wrote:

Normally, you create all indexes on a table at the time the table itself is created with CREATE TABLE. See section 13.2.6 CREATE TABLE Syntax. CREATE INDEX allows you to add indexes to existing tables.

http://dev.mysql.com/doc/mysql/en/CREATE_TABLE.html

24

Re: PunBB 1.2-dev (01 Nov) - Unable to create indexes

Tried converting a 1.1.5 db with the script included, same problem. sad

25

Re: PunBB 1.2-dev (01 Nov) - Unable to create indexes

Hi,

I have the same problem...
With phpMyAdmin it works with:

ALTER TABLE `forum_topics` ADD INDEX `topics_moved_to_idx` ( `moved_to` )


With: CREATE INDEX forum_topics_forum_id_idx ON forum_topics(forum_id);

I also get:  "#1044 - Access denied for user: 'xxx@localhost' to database 'xxx'"