hazcod / Gunther

Easy web frontend for media streaming - Fork me! (NO LONGER MAINTAINED)
27 stars 5 forks source link

Error 1005 SQL Script #6

Closed blindpet closed 9 years ago

blindpet commented 9 years ago

Again using the mysql -u root -p < setup_database.sql

After commenting out the search_path I get this new error

ERROR 1005(HY000) at line 34: Can't create table 'gunther.#sql-3b0_25' (errno: 150)

hazcod commented 9 years ago

Have you pulled the latest version of the script just now? I changed the serial type to unsigned int auto_increment too.

blindpet commented 9 years ago

Ok it seems to be OK now, new issue posted though

blindpet commented 9 years ago

This actually didn't get fixed (my previous installation I had modified config.php and the setup_database correctly). I ran the script and still get the 1005 error, I am running the script as root with the syntax above.

hazcod commented 9 years ago

I will check this within a few hours on a fresh mysql installation.

blindpet commented 9 years ago

Thanks, I tried all the syntax manually and it is definitely the line 32 foreign key line. I found this post which might help http://stackoverflow.com/questions/19135691/mysql-error-1005-hy000-cant-create-table-mydb-clientaddressdetails-frm

hazcod commented 9 years ago

Can you try running CREATE INDEX i_userrole ON users(role); before running the foreign key declaration?

EDIT: Sec, while I try to solve this

hazcod commented 9 years ago

Sorry for the fuzz, it's been a while since I used MySQL. Should be fixed in 73063963e6c3113d218ea1b50ff6ea8b6c34810d

blindpet commented 9 years ago

No worries, still having issues though.

set_search path is still giving an error; Uknown system variable, when I comment it out I get a create user error

Operation CREATE User failed for 'gunther'

hazcod commented 9 years ago

Hmmm. Are you sure you are using the latest script? I ran this script fine on a new mysql install.

blindpet commented 9 years ago

Yep, I deleted the sql script and git pulled.

hazcod commented 9 years ago

Alright, Im getting the same error as you now. (NO IDEA why it worked 3 hours ago). Looking into this :)

blindpet commented 9 years ago

Hehe gotta love tech, wish I could be of more help but don't have that much MySQL syntax experience.

hazcod commented 9 years ago

EDIT: Just to be sure, have you removed the PostgreSQL part so only the MySQL part is in the script? Because this is why I got the errors as you described. Be sure to do a DROP DATABSE gunther; and DROP USER gunther; to start with a clean slate.

blindpet commented 9 years ago

I had not before but I just did now and am getting the same error in Line 40.

CREATE USER gunther IDENTIFIED BY 'htpcguides'; GRANT ALL PRIVILEGES ON gunther to gunther;

hazcod commented 9 years ago

Have you dropped the database and user? What is the exact error you are getting?

blindpet commented 9 years ago

I was only dropping the database and not the user!

I will try adding the postgresql stuff now

hazcod commented 9 years ago

Glad I could be of help! I am closing this issue. Feel free to open a new one up if anything comes to mind.

(Currently working on movie info page)