I'm currently trying to move my forum from a Bluehost shared hosting account, to a dedicated 1and1 managed server.
I've backed up the file structure and uploaded that to the new server, and I've backed up the database, created a new database on the new server, and have successfully accessed the database via SSH and phpmyadmin, so I know all of the data was migrated successfully.
The database was also backed up from a mysql 5 db and the new server is also using mysql 5, so I don't think there were any version differences. Or could they be issues?
Finally I edited the includes/config.php file and added the new database details.
However this is where I'm now stuck. When I try to go to the forum I get a database error screen appearing, and looking at the source code it is reporting the following error:
So I then tried a small php script in the same directory on the server and that worked correctly, connecting to the mysql database and reporting back its details.
The script I used to test it is as follows:
As I said, that php script connects to the database perfectly. So why can't vBulletin connect? Are there any other files and settings I need to change from the original installation to make it work on the new 1and1 managed server?
I did wonder if the port number was wrong for the mysql server, as I've seen it shown as 3316 in a couple of places, so I did try that, but with no success.
Also can mysqli be used on 1and1 dedicated managed servers? (obviously I just want to get the database connecting first).
And final thought. Does it matter what the domain is that I'm using on the new server while I'm migrating the site? Obviously I don't want to redirect the real domain to the new location until I know it's working correctly.
I've backed up the file structure and uploaded that to the new server, and I've backed up the database, created a new database on the new server, and have successfully accessed the database via SSH and phpmyadmin, so I know all of the data was migrated successfully.
The database was also backed up from a mysql 5 db and the new server is also using mysql 5, so I don't think there were any version differences. Or could they be issues?
Finally I edited the includes/config.php file and added the new database details.
However this is where I'm now stuck. When I try to go to the forum I get a database error screen appearing, and looking at the source code it is reporting the following error:
Database error in vBulletin :
mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/tmp/mysql5.sock:3306' (2)
/homepages/x/dxxxxxxxxx/htdocs/forum/includes/class_core.php on line 311
mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/tmp/mysql5.sock:3306' (2)
/homepages/x/dxxxxxxxxx/htdocs/forum/includes/class_core.php on line 311
The script I used to test it is as follows:
<?php
$hostname="localhost:/tmp/mysql5.sock";
$database="dbxxxxxxxxx";
$username="dboxxxxxxxxx";
$password="xxxxxxxx";
echo "MySQL test ";
$link = mysql_connect("$hostname", "$username", "$password", "$database");
echo $link."<br />";//should get a resource here
/* check connection */
if (!$link) {
printf("Connect failed: %s\n". mysql_error());
//exit();
echo "It failed MySQL said ".mysql_error();
}
echo "System status: \n". mysql_stat($link);
mysql_close($link);
?>
$hostname="localhost:/tmp/mysql5.sock";
$database="dbxxxxxxxxx";
$username="dboxxxxxxxxx";
$password="xxxxxxxx";
echo "MySQL test ";
$link = mysql_connect("$hostname", "$username", "$password", "$database");
echo $link."<br />";//should get a resource here
/* check connection */
if (!$link) {
printf("Connect failed: %s\n". mysql_error());
//exit();
echo "It failed MySQL said ".mysql_error();
}
echo "System status: \n". mysql_stat($link);
mysql_close($link);
?>
I did wonder if the port number was wrong for the mysql server, as I've seen it shown as 3316 in a couple of places, so I did try that, but with no success.
Also can mysqli be used on 1and1 dedicated managed servers? (obviously I just want to get the database connecting first).
And final thought. Does it matter what the domain is that I'm using on the new server while I'm migrating the site? Obviously I don't want to redirect the real domain to the new location until I know it's working correctly.
Comment