close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Uploading MySql Database to Hosting Server

Thread begun 3/18/2009 11:41 am by grantr281040 | Last modified 9/26/2014 9:12 am by Jason Byrnes | 30720 views | 9 replies |

grantr281040

Uploading MySql Database to Hosting Server

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!

Sign in to reply to this post

grantr281040

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!

Sign in to reply to this post

*nixtechno

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

Sign in to reply to this post

djstringer293705Beta Tester

Database control

Originally Said By: grantr281040
  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
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

Sign in to reply to this post

simeononuh382792

Data Upload (MySQL)

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

Sign in to reply to this post

Neil Beadle

Database Starter Kit for PHP

You may want to take a look at the Database Starter Kit for PHP.
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.

Sign in to reply to this post

donegan365577

Having Problems Uploading SQL Database to Hosting Server

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

Sign in to reply to this post

donegan365577

Problem Solved

I figured it. Problem solved.

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

Sign in to reply to this post

Rood's Media

I will be attempting to to setup my own localhost in the morning and creating a mySQL database for testing. I just needs clarification on a few details.

1. I have to setup MAMP on my mac to test locally.
2. My local site has to sit within the MAMP folder to work (nowhere else)
3. Where is the local database supposed to reside?
4. I have to upload the database to the live server how? Through my Host's tools (1and1)?
5. When I am happy with the test results locally i can publish with Dreamweaver.

Sign in to reply to this post

Jason ByrnesWebAssist

See this tutorial for details on setting up MAMP on your mac:
http://www.webassist.com/tutorials/Set-up-a-test-server-on-Mac-OS

This tutorial will help you define the site in Dreamweaver:
http://www.webassist.com/tutorials/Define-a-dynamic-site-in-CS5

And this tutorial for creating the Database connection:
http://www.webassist.com/tutorials/Create-a-PHP-database-connection

See this tutorial for the basics of getting started with Databases in Dreamweaver:
http://www.webassist.com/community/tutorials/view_tutorial.php?tid=104


you ask "Where is the local database supposed to reside?", don't think of the database as a physical file that you access through the Mac Finder, instead, you access the database through dreamweaver by using SQL (Structured Query Language) recordsets, insert, update or delete statements.

The database is also accessed using GUI Tools like phpMyADMIN, Sequel Pro, Heidi SQL just to name a few.

to move the database from the local host, to the live server, you would use phpMyADmin (which is a part of the MAMAP package) to export the tables, then import them to the remote database using phpMyADmin which is available through the 1and1 control panel for your site.


we don't have a tutorial specific to this, but you can find plenty of information on it through using google.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...