Hi,

I'm trying to install Drupal using MysqlTool which comes with my hosted server. I have installed numerous cms before but I don't know squat about Mysql. My server also already comes with a mysql database, so I need only create the drupal tables, as I understand it.

The Installation documentation with Drupal says:

----
3. LOAD THE DRUPAL DATABASE SCHEME

Once you have a database, you must load the required tables into
the database.

If you use a web-based control panel, [MYSQLTOOL????] you should be
able to upload the file 'database.mysql' from Drupal's 'database'
directory and run it directly as SQL commands.[I DON'T SEE ANY OPTIONS TO UPLOAD ANYTHING IN MYSQLTOOL]

From the command line [HUH?], use:

mysql -u nobody -p drupal < database/database.mysql
----

MYSQLTOOL does offer an "execute sql statement" link which brings up an empty box with an "execute" button below it, it also has a "New Table" link which brings up a bunch of form fields to fill out, and it also offers a "Generate create tables script" which shows a list of tables already in the database, and the option to select or unselect them and the "Generate" button.

Its all Greek to me. The only thing I tried was pasting the contents of the database.mysql file in the "execute sql statement box" and executing it which returned some error message.

Can anyone give me any advice?

Comments

Dublin Drupaller’s picture

I was you a few months ago!!

I discovered drupal...didn't have a clue about mysql..and had the same head wrecking problems with trying to get going. I'm still not much the wiser, but, while I don't know the mysqltool thing..try this:

a) make sure you're working with a brand new database....i.e. if you see tables in the left window, it menas there are already tables setup...better to CREATE NEW DATABASE if you can.

b) in the "execute sql statement box" is there an option to load a file?

if there is...just point it to the MYSQL file that comes with drupal.

if there isn't...when you're pasting in the MSQL code..remove the following lines at the very top. That used to give me an error message.

-- MySQL dump 8.22
--
-- Host: localhost    Database: drupal_devel
-- Server version  3.23.52-nt

Hope that helps.

Dub

DUBLIN DRUPALLER
___________________________________________________
A drupal user by chance and a dubliner by sheer luck.
Using Drupal to help build Artist & Band web communities.

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate

timster-1’s picture

its turning out this error message:

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 '; -- -- Table structure for table 'accesslog' -- CREATE

Timster
P.S. Thanks for the prompt response.

Dublin Drupaller’s picture

Sounds like it you're on the right track..

quick question: are you using notepad.exe to paste the sql file across or something else?

the reason I ask is in case it's inserting some weird characters. Notepad.exe is what I tend to use.

Anyway. Try this:

1. Select the following table structure for ACCESSLOG.

2. paste it into the sql box

3. execute it.

4. see what happens.

You should get a message back saying something like "succefully created table accesslog...instructions..blah blah blah".

CREATE TABLE accesslog (
  title varchar(255) default NULL,
  path varchar(255) default NULL,
  url varchar(255) default NULL,
  hostname varchar(128) default NULL,
  uid int(10) unsigned default '0',
  timestamp int(11) unsigned NOT NULL default '0',
  KEY accesslog_timestamp (timestamp)
) TYPE=MyISAM;

If that works for you it means that your mysqltool thing is having problems with the little comments inserted in the mysql file before each table.

I'm only guessing, mind you, but, I had a similar problem before and just pulled out the comments and it worked for me.

hope that helps. Don't let it put you off drupal. I am as thick as three planks of wood when it comes to php & mysql..but once you get over that initial headache..it's well worth it.

Dub

DUBLIN DRUPALLER
___________________________________________________
A drupal user by chance and a dubliner by sheer luck.
Using Drupal to help build Artist & Band web communities.

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate

timster-1’s picture

Thanks again Dub, I appreciate your looking out for me on this...

I tried your suggested code and it did work fine, I then removed all the comment code from the database mysql file and tried it out but received this sql syntax error:

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 '; CREATE TABLE accesslog ( title varchar(255) default

It makes me wonder if for mysql there is another alternative command to use for creating tables??

I use several different CMS for various different projects, it looks like Drupal is the corrct choice for my upcoming one... so yes I'm willing to stick with it for awhile.

Thanks again for your help.

Dublin Drupaller’s picture

Hi Timster...

Sounds like you're making progress...quick question...is there a semicolon before the "create table accesslog" text in your mysql file?

That could be what is causing the syntax error message..

By the way..if you have already created an ACCESSLOG table, there's no need to do it again.

Dub

DUBLIN DRUPALLER
___________________________________________________
A drupal user by chance and a dubliner by sheer luck.
Using Drupal to help build Artist & Band web communities.

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate

timster-1’s picture

I must admit I've reached the GRrrrrr stage.

I finally broke down and installed phpmyadmin, which wasn't too too bad.

It appears that the installation of the tables went fine but I can't be sure since there is no recognizable prefix to the tables that I can see...

(I've actually got a ton of different systems tables in my database from other systems I've tried and its hard to have any idea about which ones are drupal)

So now I have this error popping up when I trial to pull up my drupal install (ie site/drupal/index.php)

Fatal error: Table 'xxxxxxx.sessions' doesn't exist query: SELECT u.*, s.* FROM users u INNER JOIN sessions s ON u.uid = s.uid WHERE s.sid = '3d5fbabc82ccff28c7d301ff880d031d' AND u.status < 3 LIMIT 0, 1 in /home/u5/xxxxxx/html/drupal/includes/database.mysql.inc on line 66

Was I supposed to update the conf.php file, site/settings.php file... or both, I think I've done both... I'm gettting dazed and confused here...

Timster,
P.S. do you know how to delete more than one table at a time in mysql? Like all with a certain prefix??? I need to clean up my mysql databases bad, but single click deleting them is taking forever!

I find

Dublin Drupaller’s picture

Back track a little timster. what you need to do is:

(a) create a new seperate database for your drupal...don't put it into another one..as it might overwrite tables/data that is related to other stuff.

(b) Once you have setup a new one it's fairly much a breeze using PHP Myadmin. Ignore the kitchen sink interface which has loads of options and links. All you need to do is:

1. Click on the database name in the top left corner.

2. Click on the SQL tab

3. Click on the BROSWE button with AUTODETECT selected below it and point it to your drupal.mysql file.

4. make a note of the database name and password.

5. edit conf.php in the /includes/ folder to point to your database.

6. Launch drupal.

Hope that makes sense...if you need a hand getting over this hump...drop me an email and I can help set up the first one for you if you want.

Cheers

Dub

DUBLIN DRUPALLER
___________________________________________________
A drupal user by chance and a dubliner by sheer luck.
Using Drupal to help build Artist & Band web communities.

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate

timster-1’s picture

Dublin,

I finally got a version of Civicspace installed so now I'm giving Drupal a thorough test drive. Still not sure if its the one for this project but it looks likely.

Cheers,

Timster