Joomla! Discussion Forums



It is currently Fri Nov 27, 2009 12:37 am (All times are UTC )

 


Forum rules

Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 11 posts ] 
Author Message
Posted: Fri Oct 30, 2009 2:27 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Fri Oct 30, 2009 2:17 pm
Posts: 3
Hi, I am having troubles installing Joomla! using the installer. The version I am trying to install is V1.5.14. I get as far as the database setup and then installation fails with the message:

Could not connect to MySQL

I see this seems to be a common problem, but most people seem to have solved it in ways that do not work for me.

This is a fresh install, and I have created a database for joomla to use with a utf8_general_ci collation. I created a user for the database with full priveleges. All this is via CPanel (I am installing on a hosted server).

Some system information:

Apache Version 2.2.3
MySQL Version 5.0.45
PHP Path /usr/bin/php
PHP Version 5.2.9

I can run the small script:

Code:
<?php
$host = 'localhost';
$user = 'account_user';
$pass = 'my_password';
$db = 'account_db';

//Don't change below here
$conn = mysql_connect($host, $user, $pass);
mysql_select_db($db, $conn);
echo '<hr />anything above this linebreak is BAD!';
?>


as lifted from another similar post on the subject and this works fine with no errors. The same inputs used for Joomla installation result in the error above.

I'm sure the host, username and password are correct. Another clue is that if I delete the database and user and re-try the installation I get exactly the same error.

So the question is, what other possibilities are there for why Joomla installation can't connect to the db?


Last edited by Brian_S on Fri Oct 30, 2009 3:42 pm, edited 1 time in total.

Top
  E-mail  
 
Posted: Fri Oct 30, 2009 3:05 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Sat Aug 16, 2008 1:46 pm
Posts: 2230
Location: the Bat Cave
That script connects to the database but does not try to write to it so maybe it is a user permissions issue. When you tried the script you saw nothing above the horizontal line?


Top
  E-mail  
 
Posted: Fri Oct 30, 2009 3:13 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Oct 20, 2009 2:25 pm
Posts: 10
Hi;

I have a windows 2003 server. I recently downloaded Xampp, the latest version and installed it under the C: drive. I verified that its working by typing http://localhost. the Xampp welcome page came up. I opened the control and started mysql and apache. then I downloaded the latest version of Joomla and installed it in the htdocs folder of Xampp. I verified its download by typing http://localhost/joomla15 and it brought me to the welcome page. during install it would not connect to the mysql database. I really dont know much about this stuff, its a project for my boss and Im trying my hardest to learn it. I am very much a beginner with servers, php and apache/joomla.....I've read through the other threads but frankly they are over my head. I would seriously appreciate help with this as I would love to know this stuff. If someone is willing to do phone support or email support let me know and that would be super-cool.....Please Help! and keep it easy....

Jason


Top
  E-mail  
 
Posted: Fri Oct 30, 2009 3:35 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Fri Oct 30, 2009 2:17 pm
Posts: 3
What a doughnut I am. The previous script assumes a certain warning level to get messages. Whilst actually editing the script I changed it and now I get an appropriate error!

Code:
<?php
$host = 'localhost';
$user = 'account_user';
$pass = 'my_password';
$db = 'account_db';

//Don't change below here
$conn = mysql_connect($host, $user, $pass);
mysql_select_db($db, $conn);

if (!mysql_select_db($db, $conn))
    echo "Database Selection Error: ".mysql_error();
else
if (!mysql_query( "CREATE TABLE `a_test_table`
    ( `id` INT NOT NULL AUTO_INCREMENT ,
      `data` TEXT NOT NULL ,
      PRIMARY KEY ( `id` )
    );"))
    echo "Query Error: ".mysql_error();

echo '<hr />anything above this linebreak is BAD!';

?>


I now get the error:
Quote:
Database Selection Error: Access denied for user 'account_user'@'localhost' (using password: YES)


So something that I should be able to fix with my host.


Top
  E-mail  
 
Posted: Fri Oct 30, 2009 3:41 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Fri Oct 30, 2009 2:17 pm
Posts: 3
...and fixed.

Hosting is with lunarpages. They have changed their servers. One account I have with them uses localhost, this new account will not accept localhost. Instead there is a specific hostname for the database.


Top
  E-mail  
 
Posted: Fri Oct 30, 2009 4:06 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Oct 20, 2009 2:25 pm
Posts: 10
Hi;

I have a windows 2003 server. I recently downloaded Xampp, the latest version and installed it under the C: drive. I verified that its working by typing http://localhost. the Xampp welcome page came up. I opened the control and started mysql and apache. then I downloaded the latest version of Joomla and installed it in the htdocs folder of Xampp. I verified its download by typing http://localhost/joomla15 and it brought me to the welcome page. during install it would not connect to the mysql database. I really dont know much about this stuff, its a project for my boss and Im trying my hardest to learn it. I am very much a beginner with servers, php and apache/joomla.....I've read through the other threads but frankly they are over my head. I would seriously appreciate help with this as I would love to know this stuff. If someone is willing to do phone support or email support let me know and that would be super-cool.....Please Help! and keep it easy....

Jason


Top
  E-mail  
 
Posted: Thu Nov 05, 2009 8:28 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Thu Nov 05, 2009 8:23 pm
Posts: 1
Hello Jason

I had the same problem, also a new XAMPP and Joomla installation.
In the XAMPP Control Panel I pressed the [help] button.
In the next screen/pop-up I ressed the [Read me] button.
Here I found the username and the password you have to use:
Username: root
Password:
no password

I entered this in the screen for step 4.

this worked.

so what I entered in screen 4

Type database: mysql
Host name: localhost (I did an installation on my own computer)
User name: root
Password: (no password)
Database name: multi-media (this was the name I wanted to have for this project)


Top
  E-mail  
 
Posted: Thu Nov 05, 2009 10:33 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Thu Nov 05, 2009 10:25 pm
Posts: 1
Location: http://www.elektrokampus.com
ohh i had the same problem too
http://www.elektrokampus.com
now it is ok,Thx helps message ;)


Top
  E-mail  
 
Posted: Fri Nov 06, 2009 8:44 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Sep 16, 2009 6:31 pm
Posts: 41
Location: Wichita, KS, USA
I'm having a problem with 1.5.15. Here are the steps I made.

1. I set up a database, then user, generated a strong password which I kept on my clipboard until time to use it.

2. In phpmyadmin, I clicked the database name and tried to import the right sql file. However this wasn't a sure thing because on every file but one I got no tables. On the last one I got 35 tables but there was an error in the sql syntax.

I have no idea what to do about that or how many tables I should be seeing or which file produces them

I uploaded the zip to my server using the cpanel, then extracted on the server.
The installation file wasn't there. So I zipped the one in the script and uploaded and extracted it the same way. Then ran the installer.

It gave me a cannot connect to database error on that screen too.

We need more complete instructions on how to do this. Not everyone understands how this all works. I'm no stranger to setting up databases
but this one throws me every time.

_________________
My Joomla Site for Experts and their niches
http://www.home-earners.com


Top
  E-mail  
 
Posted: Fri Nov 06, 2009 7:14 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Sat Aug 16, 2008 1:46 pm
Posts: 2230
Location: the Bat Cave
Why do you have multiple sql files? If the installation folder was not in your zip file I would guess( I know, assumption) that you are trying to restore a site rather then install a new Joomla site. To install a new Joomla site you only need to create a database for Joomla to use, during the install Joomla will populate the database.

If you are trying to restore a site then after uploading and unzipping the files you will need to edit the configuration.php file and add the correct info for the database connection and the absolute paths for the tmp and logs folders. If the Live Site variable was used that may need to be corrected or omitted as well, also if you used the FTP layer the FTP info needs to be corrected.
Code:
/* Database Settings */
   var $dbtype = 'mysql';               // Normally mysql
   var $host = 'localhost';            // This is normally set to localhost
   var $user = '';                     // MySQL username
   var $password = '';                  // MySQL password
   var $db = '';                     // MySQL database name
   var $dbprefix = 'jos_';               // Do not change unless you need to!

var $ftp_host = '';
   var $ftp_port = '';
   var $ftp_user = '';
   var $ftp_pass = '';
   var $ftp_root = '';
   var $ftp_enable = '';
   var $tmp_path   = '/tmp';
   var $log_path   = '/var/logs';
   var $live_site = '';                // Optional, Full url to Joomla install


Top
  E-mail  
 
Posted: Fri Nov 13, 2009 2:58 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Wed Sep 30, 2009 12:25 am
Posts: 2
webjoy wrote:
Hello Jason

I had the same problem, also a new XAMPP and Joomla installation.
In the XAMPP Control Panel I pressed the [help] button.
In the next screen/pop-up I ressed the [Read me] button.
Here I found the username and the password you have to use:
Username: root
Password:
no password

I entered this in the screen for step 4.

this worked.

so what I entered in screen 4

Type database: mysql
Host name: localhost (I did an installation on my own computer)
User name: root
Password: (no password)
Database name: multi-media (this was the name I wanted to have for this project)


Thanks Webjoy... I'got the same problem too... your step work.... Cheers...


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

Quick reply

 



Who is online

Users browsing this forum: weby_gr and 44 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group