OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Unable to establish database connection

Are you an Editor, Author, or Journal Manager in need of help? Want to talk to us about workflow issues? This is your forum.

Moderators: jmacgreg, michael, vgabler, John

Forum rules
This forum is meant for general questions about the usability of OJS from an everyday user's perspective: journal managers, authors, and editors are welcome to post questions here, as are librarians and other support staff. We welcome general questions about the role of OJS and how the workflow works, as well as specific function- or user-related questions.

What to do if you have general, workflow or usability questions about OJS:

1. Read the documentation. We've written documentation to cover from OJS basics to system administration and code development, and we encourage you to read it.

2. take a look at the tutorials. We will continue to add tutorials covering OJS basics as time goes on.

3. Post a question. Questions are always welcome here, but if it's a technical question you should probably post to the OJS Technical Support subforum; if you have a development question, try the OJS Development subforum.

Unable to establish database connection

Postby kenzakreski » Sat Sep 11, 2004 1:32 am

Thank you for such a nice collection of code, this is great!!!

I am installing OJS on a testing server and am having difficulty with establishing the database connection. My error occurs on http://24.69.157.189/~ken/OJS/install.p ... tep&step=2

I use my admin user name and password for the server, the default "ojs" for the database name, leave the other boxes unchecked but still get the message. see pdf screenshot http://24.69.157.189/~ken/ojs/error.pdf

"Sorry, an error has occurred: Unable to establish database connection."

I checked my include/db/db.mysql.inc.php file for the correct function create statement (below). It has the correct statement as per Kevin's previous post.


// create a new database
function create_db($db) {
return mysql_query("create database $db", $this->connection);


The remaining steps return the same error message. Suggestions at this time of night ... would be welcome.

I am running OSX.2.4 no updates
with stock Apache Server
with Entropy php 4.3.4 http://www.php.net/downloads.php
and MySQL 4.0.20 http://dev.mysql.com/downloads/
kenzakreski
 
Posts: 8
Joined: Sat Sep 11, 2004 12:45 am
Location: Gabriola Island BC

ojs version ojs-1.1.8.tar.gz and db changes

Postby kenzakreski » Sat Sep 11, 2004 12:16 pm

I am using the current version of ojs-1.1.8.tar.gz

I am also thinking at this stage I should be considering any db changes to the stock model. If we could adapt this structure to receive technical (applied radio practise and procedures) documents, my project "static" would be all but complete.
kenzakreski
 
Posts: 8
Joined: Sat Sep 11, 2004 12:45 am
Location: Gabriola Island BC

Postby kevin » Sat Sep 11, 2004 2:24 pm

As the error message indicates, the script cannot connect to your database server using the connection parameters you've supplied. Typically this would indicate the server isn't running or the username/password you entered are not valid.

Assuming that you've verified that your database server is running and that you can connect to it using the same authentication credentials from the mysql command-line client, I would suggest editing include/db/db.mysql.inc.php and removing the error-suppressing "@" symbols (e.g., changing "@mysql_pconnect" to "mysql_pconnect"). This may cause a more detailed error message regarding why the connection failed to be printed.
kevin
 
Posts: 338
Joined: Tue Oct 14, 2003 8:23 pm

running fine now

Postby Ken » Mon Sep 13, 2004 10:46 pm

I started the mysql server using the clear instructions that come with the install.

completed the install

Then logged on to localhost as root user with out any password.

secured the system with a new password

completed the initial editor steps

renamed install files as .bak

running fine now, great web application. thanks for the help.
Ken
 


Return to OJS Editorial Support and Discussion

Who is online

Users browsing this forum: Bing [Bot] and 1 guest