Hi,
just trying to get drupal set up on my local machine, seem to have an issue with database connection.
My database exists, although there are no tables in it.
I have the user permissions all set.
But I get the 'Unable to connect to database server' message when I load index.php.
I believe that part of the problem is that I haven't succeeded in loading the database.mysql tables into my database. I tried executing the string '-u username -p databasename < database/database.mysql' from the mysql command line, but it seems that that's not the right thing to do! Everything up to that point seems fine.
Is there a different procedure for loading tables when the database is running locally?
Aside from that, here are the versions I'm running, if that happens to be a contributing factor:
W2K Pro (v5 SP4)
Apache 2.0.50
PHP 4.3.8
MySQL 4.1.12a
Drupal 4.7.0.beta4
Any tips?
Thanks in advance.
Comments
Just download denwer - it is
Just download denwer - it is configured web server with php, mysql etc...
1) Install drupal to X:\home\test1.ru\www
2) Go to localhost/tools/phpmyadmin and create database
Install drupal with parameters: login to mysql - root, no pass, mysql host - localhost
Thanks for this tip!
Thanks for this tip! I'm not going to try it just yet, but will keep it in mind.
One question though: why do I need to install it at X:\home\test1.ru\www instead of X:\www, or even just X:\?
?
phpmyadmin
The install instructions should work fine on ur setup, i have successfuly installed on similiar albeit using 4.6.x drupal. It maybe simpler for you to create the database using phymyadmin or similiar utility (http://www.phpmyadmin.net). Then import the sql files from there.
Just to second the
Just to second the suggestion of phpMyAdmin. It's easy to use and uploads the drupal db tables with just a few clicks. I've done it 10 times, no hassles, but that's another story!
Thanks, but...
Thanks for the tip, but I'm still missing something. I can get into phpAdmin, but I don't know what to do next. Can you point me to a page that explains how to import the tables?
In the meantime, I have signed up with a hosted service and am making progress with Drupal 4.6.5. But I'd still like to get the one on my localhost running.
now this is
now this is interesting.....
Let's look at step 3
this is run from the OS command line, not from within mysql cmd line. I generally put the mysql/bin directory in my path statement on Windows systems to make this easier.
-sp
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
One step forward...
sepeck, that was a revelation!
I did this from cmd.exe:
C:\> mysql -uroot -p**** drupal01 < C:\www\drupal\database\database.mysql
and it seems to have loaded all the tables, judging from what I see in mySQLAdmin.
But I'm still getting loads of warnings when I browse to
http://localhost/drupal/index.php
like this one:
Warning: Table 'drupal01.drupal01_users' doesn't exist query: SELECT u.*, s.* FROM drupal01_users u INNER JOIN drupal01_sessions s ON u.uid = s.uid WHERE s.sid = '8c76670e8ec49e99f31e7fe552072291' in C:\www\drupal\includes\database.mysql.inc on line 124
eep. is this two steps backward? Do I need to reconfigure something in settings.php? Or in mySQL?
Prefix
You probably defined a db_prefix in sites/default/settings.php; this prefix is tacked at the front of all tables name in queries. If you didn't load the database using prefixes, These concatenated tablenames will not exist.
Go to sites/default/settings.php and make sure that $db_prefix is set to an empty string (see below) or matches the prefix you used when installing.
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.
prefixes fixed, now it's a sendmail issue...
Heine, that did the trick. Thanks for the pointer.
I now have a functioning Drupal installation on my local machine!
Which means I need to deal with the sendmail error that comes up when I registered. I've gone to c:\php\php.ini and tried a couple of things on the sendmail line.
I tried
with no effect on the error. I also tried using an address from a gmail account - with no effect on the error.
I've opened user.module and looked the line 394:
Can I put an address directly in here?
---
new and green, but making progress, that's me!
SMTP Support
You can install smtp support if you don't have sendmail. When creating the first account, you'll either see the password on screen, or you'll be logged in immediately. In those cases no mailer is required.
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.
smtp support for version 4.7
Heine, thanks, but I'm using 4.7 beta on this machine. So it sounds like I should look into installing sendmail, or backtracking to version 4.6
---
new and green, that's me!
4.7 as well (CVS)
CVS is for 4.7. Unfortunately linking to a module description even when you're on the CVS page gives you the option to 'download the latest release' in this case 4.6.0. You actually have to go to 'older versions': here's a proper link.
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.
Sorted
Once again, thanks for the explanation.
I now have the smtp thing working, have signed in as a second user, got the email, changed the password.
Everything works!
So, all told, it took three questions and three answers to get everything up and running on my local machine. I am very pleased.
Now to start fooling around....
---
new and green, but learning, that's me!
Great
Enjoy tinkering!
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.