PDA

View Full Version : Uploading MySql Database to Hosting Server


grantr281040
03-18-2009, 11:41 AM
Hi there. I have created my site and a MySql database and it seems to work great during local testing. But when I upload my site, I get an error...

Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/.../connIG.php on line 9

Fatal error: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/.../connIG.php on line 9


I assume I have to do some sort of export of the database???? I have no idea where to even start.

Thanks!

grantr281040
03-18-2009, 01:54 PM
I found the export function and when I try to "export" I get an error:
"Connection for controluser as defined in your configuration failed."

I have no idea where to go from here.

Thanks!

*nixtechno
03-26-2009, 01:39 AM
I'm not following you 100% but it seems your configuration is setup from remote :) Check your configuration files to ensure everything is correct.


Side note, you can import the db easier via ssh if you have it:

(the -pyourpassword is correct! Normally you do -p, but you can do -pyourpassword to pass the password on so you don't have to type it in.)

#mysql -u username -pyourpassword db_name < yourdb_youareinstalling.sql

David Stringer
03-30-2009, 01:52 PM
Hi there. I have created my site and a MySql database and it seems to work great during local testing. But when I upload my site, I get an error...

Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/.../connIG.php on line 9

Fatal error: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/.../connIG.php on line 9


I assume I have to do some sort of export of the database???? I have no idea where to even start.

Thanks!


Hi Grant,

I only recently started playing with databases and found it quite daunting. I was then pointed by a friend in the direction of SQLyog which is available from
http://www.webyog.com/en/downloads.php and have found it invaluable ever since.

I tried out the free version and very quickly purchased the Pro version - more bells and whistles etc! It connects to your own computer localhost and as many databases on the internet you would wish to. You can also transfer all the info in a database from your local machine to a remote server elsewhere.

I find it absolutely invaluable.

Hope this helps.

David

simeononuh382792
06-22-2009, 08:49 AM
I think you can achieve this by building your insert statement from your local database connection and and executing it on the online database connection.


Sule

Neil Beadle
06-22-2009, 03:51 PM
You may want to take a look at the Database Starter Kit for PHP.
http://www.webassist.com/training/database-for-php/

This includes steps for exporting your .SQL database and importing it onto your live hosting provider's server using PHPMyAdmin.

This could definitely help fill in some gaps that you may be experiencing.

donegan
07-02-2009, 01:58 PM
Hello,

I purchased the Database Starter Kit fof PHP and the UserRegistration Solution Pack and am in the process of practicing uploading my MySQL Database to my Hosting Server.

I have a problem I just can not figure out how to fix. I hope you all will have some pointers to get me on the right track. I am using the PHP Database just as it came to me with the except that I import the User Registration Table.

MySQL Server Side Version - 5.0.25
myphpmyAdmin version - 2.11.9.4

I checked the error log and could not find a solution to this problem.

Once I export out of "MySQL Administrator" and try to import into MyphpMyAdmin I keep getting the following error message.


Error
SQL query:

CREATE TABLE `countries` (

`CountryID` int( 10 ) unsigned zerofill NOT NULL AUTO_INCREMENT COMMENT 'Primary key for Countries table',
`CountryName` varchar( 50 ) COLLATE latin1_bin DEFAULT NULL COMMENT 'Name of country',
`CountryAbbrev` varchar( 50 ) COLLATE latin1_bin DEFAULT NULL COMMENT 'Abbreviation of country',
PRIMARY KEY ( `CountryID` ) USING BTREE,
KEY `CountryID` ( `CountryID` )
) ENGINE = InnoDB AUTO_INCREMENT =4 DEFAULT CHARSET = latin1 COLLATE = latin1_bin;


MySQL said:

#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'COLLATE latin1_bin DEFAULT NULL COMMENT 'Name of country',
`C
-------------------
Sheila
donegan@iinet.com

donegan
07-03-2009, 09:43 PM
I figured it. Problem solved.

------------
Sheila