PDA

View Full Version : Attempt to Upgrade to 3.8.2


Napster6
05-11-2009, 10:53 PM
Well I am new to this I have asked several questions and Brian has been amazingly quick to respond. Basically, I attempted to upgrade to 3.8.2 and just kinda browsed the instructions. Bad idea, I overwrote the config.php with config.php.new before changing any settings. Now on step 2/13 of the upgrade I get this.

Attempting to attach to database

Error description: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13) /mounted-storage/home119c/sub006/sc67362-TFJU/www/forums/includes/class_core.php on line 311

The database has failed to connect because you do not have permission to connect to the server. Please confirm the values entered in the 'includes/config.php' file.

I have gone into my server and found MySQL settings. I have the username and password, yet im not sure what else to plug in, as its still giving me the same error.

A section of my config reads as follows.

// ****** DATABASE TYPE ******
// This is the type of the database server on which your vBulletin database will be located.
// Valid options are mysql and mysqli, for slave support add _slave. Try to use mysqli if you are using PHP 5 and MySQL 4.1+
// for slave options just append _slave to your preferred database type.
$config['Database']['dbtype'] = 'mysql';

// ****** DATABASE NAME ******
// This is the name of the database where your vBulletin will be located.
// This must be created by your webhost.
$config['Database']['dbname'] = 'mx-6_forum';

// ****** TABLE PREFIX ******
// Prefix that your vBulletin tables have in the database.
$config['Database']['tableprefix'] = 'mx6_';

// ****** TECHNICAL EMAIL ADDRESS ******
// If any database errors occur, they will be emailed to the address specified here.
// Leave this blank to not send any emails when there is a database error.
$config['Database']['technicalemail'] = '******@gmail.com';

// ****** FORCE EMPTY SQL MODE ******
// New versions of MySQL (4.1+) have introduced some behaviors that are
// incompatible with vBulletin. Setting this value to "true" disables those
// behaviors. You only need to modify this value if vBulletin recommends it.
$config['Database']['force_sql_mode'] = false;



// ****** MASTER DATABASE SERVER NAME AND PORT ******
// This is the hostname or IP address and port of the database server.
// If you are unsure of what to put here, leave the default values.
$config['MasterServer']['servername'] = 'localhost';
$config['MasterServer']['port'] = 1022;

// ****** MASTER DATABASE USERNAME & PASSWORD ******
// This is the username and password you use to access MySQL.
// These must be obtained through your webhost.
$config['MasterServer']['username'] = 'mx-6_forum';
$config['MasterServer']['password'] = '********';


Any input is greatly appreciated!

TheLastSuperman
05-11-2009, 11:11 PM
Ok, now it depends on which host you use too fyi.

I was using Siteground (avoid IMO, strictly IMO) and had

$config['MasterServer']['servername'] = 'localhost';
$config['MasterServer']['port'] = 1022;

However I have always used port 3306 w/o any problems.

Additionally w/ SG I used:

$config['Database']['dbname'] = 'test_testing';

NOW, note the prefix is there so unless you need the value remove the DB prefix you have i.e.

$config['Database']['tableprefix'] = 'mx6_';

Which is wrong regardless due to this:

$config['Database']['dbname'] = 'mx-6_forum';

So they should kinda match i.e. $config['Database']['dbname'] = 'mx6_forum'; AS mx6 is the DB's prefix not the tables SO I say remove the value!

Make it this: $config['Database']['tableprefix'] = '';

Now currently I have switched over to Godaddy and that requires this:

$config['MasterServer']['servername'] = 'dbname.db.1234567.hostedresource.com';
$config['MasterServer']['port'] = 3306;

See if that helps you figure it out! Also close your browser COMPLETELY before attempting again or it can cause issues or repeat the same error messages when it is in fact ready to roll :D

AND now is the time to make a backup of your config file :D

Lynne
05-11-2009, 11:13 PM
Are you sure your database login name and password are correct? This is usually different than your server login information.

wolfstream
05-11-2009, 11:54 PM
config.php doesn't usually have to be overwritten at all. There are times when it changes, but those are usually only major releases (ie: vb3, vb4, etc).

If you're using cpanel (many are), you can assign another username and password to the database inside the control panel itself, this may help relieve the situation

Napster6
05-12-2009, 01:05 AM
Are you sure your database login name and password are correct? This is usually different than your server login information.

It is different then my server login information.

I tried what "TheLastSuperman" said still same error, I also closed all windows after editing.
Any other ideas

--------------- Added 1242094014 at 1242094014 ---------------

config.php doesn't usually have to be overwritten at all. There are times when it changes, but those are usually only major releases (ie: vb3, vb4, etc).

If you're using cpanel (many are), you can assign another username and password to the database inside the control panel itself, this may help relieve the situation

I can't get into the cpanel at all, I get the Database Error page

Database Error Database error
The database has encountered a problem.
Please try the following:

* Load the page again by clicking the Refresh button in your web browser.
* Open the mx-6.ca home page, then try to open another page.
* Click the Back button to try another link.

The mx-6.ca forum technical staff have been notified of the error, though you may contact them if the problem persists.

We apologise for any inconvenience.


--------------- Added 1242094081 at 1242094081 ---------------

Oh, and my host is www.Servage.net

I can add MySQL databases inside there myself as well.

--------------- Added 1242094747 at 1242094747 ---------------

I'll add this as well, line 311 of the class_core.php file is as follows

$link = $this->functions[$usepconnect ? 'pconnect' : 'connect']("$servername:$port", $username, $password);

Lynne
05-12-2009, 01:20 AM
What is the database error you get? You'll need to view the page source to get it.

Napster6
05-12-2009, 01:29 AM
OH WOW
I fixed it, but now. my entire forums are gone. Everything.

--------------- Added 1242095745 at 1242095745 ---------------

I made a new MySQL database, is that where all the information for my forums are? that would make sense as the new one worked without a problem, but wiped my forums clean. Now im trying with the previous database I had. Im still getting an error but this time its.

Error description: mysql_connect() [function.mysql-connect]: Access denied for user 'mx-6_forum'@'**.**.***.***' (using password: YES) /mounted-storage/home119c/sub006/sc67362-TFJU/www/forums/includes/class_core.php on line 311

Lynne
05-12-2009, 01:37 AM
You said you only skimmed the directions.... you didn't Install the forums (install.php), did you? You did an Upgrade (upgrade.php), right?

Napster6
05-12-2009, 01:46 AM
Nope I just realized that. Im so effed.

The site has only been open for a little over 2 months but still.

Lynne
05-12-2009, 01:52 AM
Do you have a backup?

(One of the instructions in doing an upgrade is to make a backup. :) )

Napster6
05-12-2009, 02:00 AM
I did back it up last week, now Im just trying to find where the default saving location is. Any suggestions on that one lol.

By the way, your help is much appreciated

Lynne
05-12-2009, 03:59 AM
default saving location for what?

Napster6
05-13-2009, 12:59 AM
The vbulletin.sql, but I have found it. Now im struggling with restoring the database. I have uploaded my .sql file via FTP onto my server, cant figure out how to import it from there, as well I have tried copy paste, then also "Exqcute SQL Quesry" in the admincp. It took awhile then brought me to a blank page in the admincp,

Im so confused!

Biker_GA
05-13-2009, 01:04 AM
Can you get into cPanel? There is an option to restore a backed up DB within the MySQL options.

Napster6
05-13-2009, 01:46 AM
Here is the run down of what I have done tonight, still unsucessful

Imported database via ftp and apparently (so my server tells me) sucessfully imported into both databases I have. I had one called mx6_forum (dont remember creating that one) and when all this happened I created a new one, called mx6. but now I don't know what to do. My forums are still as if new.

What now?

Biker_GA
05-13-2009, 01:48 AM
Change your config.php file to reflect the new db. :)

Napster6
05-13-2009, 01:52 AM
I have lol. Honestly I am out of ideas and have been searching and searching the net for litterally like 10 hours.

Biker_GA
05-13-2009, 01:57 AM
If you go in via cPanel and look at the data within the tables in the DB, does it look like there's info in there, or does it look like a virgin DB?

Napster6
05-13-2009, 02:16 AM
OH MAN! that just made me realize what it was by looking at the tabls

in the config.php file I didn't have a prefix on there for my tables

Forums are fix, for anyone looking at this in the future make sure your prefix is there, and correct.