MyBB Community Forums

Full Version: SQL error 1064
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I just downloaded 1.6.4 today, doing a new install - getting the following SQL Error 1064 on the install page. What's up with that and how is this remedied? Thanks!

Quote:Connection to the database server and table you specified was successful.

Database Engine: MySQL 4.1.22

The MyBB database tables will now be created.
Creating table mybb_adminlog...done
Creating table mybb_adminoptions...done
Creating table mybb_adminsessions...done
Creating table mybb_adminviews...
MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'fields text NOT NULL, conditions text NOT NULL, custom_profile_fields text NOT' at line 7
Query:
CREATE TABLE mybb_adminviews ( vid int unsigned NOT NULL auto_increment, uid int unsigned NOT NULL default '0', title varchar(100) NOT NULL default '', type varchar(6) NOT NULL default '', visibility int(1) NOT NULL default '0', fields text NOT NULL, conditions text NOT NULL, custom_profile_fields text NOT NULL, sortby varchar(20) NOT NULL default '', sortorder varchar(4) NOT NULL default '', perpage int(4) NOT NULL default '0', view_type varchar(6) NOT NULL default '', PRIMARY KEY(vid) ) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci;

Please contact the MyBB Group for support.
You have to have PHP 5.1.X or higher to run MyBB.
Is MySQL 4.1 really the best your host can offer you?? I'm not sure why you're getting this error as other people have installed fine on MySQL 4.1 but it's extremely out of date and makes me wonder how out of date everything else your host is providing you with is. Hopefully you've not paid for this hosting if this is the best they give you.
It's his MySQL version, not PHP (though we do require PHP 5.1 or above). MySQL 4 is incredibly outdated and buggy. Just for the record, there's a workaround in [Wiki: Installing] (Broken link, head over to docs.mybb.com instead) that lets you proceed with the installation on MySQL 4, but I don't recommend it. Like I said, it's just a workaround. It's not a definite solution and it will cause you problems in the future.

I have trouble understanding why there are still hosts running on MySQL 4, it deeply disturbs me. Whatever you're paying that web hosting company is a rip-off. Any decent company will keep their software up to date. I wouldn't even bother asking them to update their MySQL installation (and possibly many other things). Switch web hosts immediately. If I may, MyBBWebHost is a great web hosting company and has quite a reputation around these forums.

/beaten
Thanks.....
I need to come back and address a couple of remarks about the out of date mysql - upgrading is a process, and when you have a bunch of sites that are not yet compatible then you have a recipe for disaster. I am the host for my sites, which have been around far longer than the latest version of mysql. In order for me to upgrade smoothly I'd have to upgrade all of my sites plus the database pretty much at the same time - and that's one heck of a lot of work that has the potential to crash my sites and cause extra work and a loss of revenue for me - and I'm not exactly getting rich from these sites as it is.

Meanwhile, I'm on a deadline with the forum so I need to focus on that first.

I don't know why I got the errors that I got either, but I wiped it all out and installed it from square one again today and the scripts ran beautifully - now my only problem is that my admin cp is blank, but that's another topic posted elsewhere.

You got the the errors because you were running MySQL 4 - and MyBB doesn't quite support it. Or are you talking about other new errors?
You could just use a server that has modern software installed...?? Fact is PHP software and other software can't keep running on old server software forever. Wordpress, the most widely used blogging software and probably the most widely used PHP script in the world, now requires PHP 5.2.4 and MySQL 5, and these aren't unreasonable specs for any server to have, but hosts that cannot run this are shooting themselves in the foot as they can't run modern, popular software. This is why hosts and users alike should upgrade to new versions as they come out and keep up to date with things, otherwise you just end up with huge problems and major upgrades to do later down the line, or you just have to use old software forever. Besides, as far as I'm aware you wouldn't have to go through and rewrite code to make current site MySQL 5 compatible, and the MySQL upgrade process would upgrade the actual tables and databases; you don't have to spend hours rewriting stuff every time you upgrade a MySQL version.
MattRogowski,

Thanks for that advice, but I found out the hard way that it doesn't work that way. When updating mysql you do have to prepare your sites first because the older tables won't work on the new version and the new ones won't work on the old one. In my case, some tables were corrupted beyond repair and my system had to be entirely restored - my sites were down for hours, and when they came back up I had to bring them all back up to date and completely re-install one of them from scratch.